Skip to content

[fix](fe) Keep decimal precision of MAP key/value and scalar Any groups independent in default decimal v3 promotion #360921

[fix](fe) Keep decimal precision of MAP key/value and scalar Any groups independent in default decimal v3 promotion

[fix](fe) Keep decimal precision of MAP key/value and scalar Any groups independent in default decimal v3 promotion #360921

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Build Third Party Libraries
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.ref }} (Build Third Party Libraries)
cancel-in-progress: true
jobs:
changes:
name: Detect Changes
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
outputs:
thirdparty_changes: ${{ steps.filter.outputs.thirdparty_changes }}
arrow_paimon_lifecycle_changes: ${{ steps.filter.outputs.arrow_paimon_lifecycle_changes }}
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
- name: Paths filter
uses: ./.github/actions/paths-filter
id: filter
with:
filters: |
thirdparty_changes:
- 'thirdparty/**'
- 'env.sh'
arrow_paimon_lifecycle_changes:
- 'build.sh'
- 'env.sh'
- 'thirdparty/arrow-paimon-vars.sh'
- 'thirdparty/vars.sh'
- 'thirdparty/build-thirdparty.sh'
- 'thirdparty/download-thirdparty.sh'
- 'thirdparty/paimon-cpp-cache.cmake'
- 'thirdparty/patches/apache-arrow-*.patch'
- 'thirdparty/patches/paimon-cpp-*.patch'
- 'thirdparty/test/arrow-paimon-lifecycle-test.sh'
- '.github/workflows/build-thirdparty.yml'
arrow_paimon_lifecycle_test:
name: Arrow/Paimon Lifecycle Test
needs: changes
if: ${{ needs.changes.outputs.arrow_paimon_lifecycle_changes == 'true' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v4
- name: Test focused thirdparty lifecycle
run: thirdparty/test/arrow-paimon-lifecycle-test.sh
script_test:
name: Thirdparty Script Test
needs: changes
if: ${{ needs.changes.outputs.thirdparty_changes == 'true' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v4
# These drive download-thirdparty.sh against stubbed downloads, so they
# need none of the toolchain the build jobs spend an hour preparing and
# finish in seconds. They were sitting in the tree unreferenced until now.
- name: Test download-thirdparty.sh
run: |
thirdparty/test/download-thirdparty-fallback-test.sh
thirdparty/test/juicefs-default-mirror-test.sh
thirdparty/test/download-thirdparty-md5-test.sh
# azure is the only package that fetches its own sources, and it is the
# last one built, so a download that fails there costs the whole tree.
# This drives build_azure against a stubbed cmake, in seconds.
- name: Test build-thirdparty.sh
run: |
thirdparty/test/azure-vcpkg-retry-test.sh
build_linux:
name: Build Third Party Libraries (Linux)
needs: changes
if: ${{ needs.changes.outputs.thirdparty_changes == 'true' }}
runs-on: ubuntu-22.04
env:
ENABLE_THIRDPARTY_CCACHE: 'ON'
steps:
- name: Checkout easimon/maximize-build-space
run: |
git clone -b v7 https://github.com/easimon/maximize-build-space
#- name: Maximize build space
# uses: ./maximize-build-space
# with:
# root-reserve-mb: 4096
# temp-reserve-mb: 4096
# swap-size-mb: 8192
# remove-dotnet: 'true'
# remove-android: 'true'
# remove-haskell: 'true'
# remove-codeql: 'true'
# remove-docker-images: 'true'
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v4
# ccache-action is vendored as a submodule and the plain checkout above does not
# fetch it. Initialise only this one; `submodules: recursive` would also clone
# contrib/clucene, which a third party build does not need.
- name: Checkout ccache-action
run: git submodule update --init .github/actions/ccache-action
# This build is cold every time, so changing one package recompiles all ~80 of
# them. build-thirdparty.sh routes the cmake-based packages through ccache when
# ENABLE_THIRDPARTY_CCACHE is on. Note that a cache saved by a pull request run
# is only visible to that same pull request, so this pays off across pushes to
# one branch; sharing it across pull requests needs a run on master.
- name: Ccache ${{ github.ref }}
uses: ./.github/actions/ccache-action
with:
key: THIRDPARTY-Linux
max-size: "1G"
restore-keys: THIRDPARTY-Linux-
- name: Download
run: |
cd thirdparty
curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-source.tgz \
-o doris-thirdparty-source.tgz
tar -zxvf doris-thirdparty-source.tgz
- name: Prepare
run: |
export DEFAULT_DIR='/opt/doris'
export PATH="${DEFAULT_DIR}/ldb-toolchain/bin:${PATH}"
packages=(
'build-essential'
'automake'
'autoconf'
'libtool-bin'
'pkg-config'
'cmake=3.22.1-1ubuntu1.22.04.2'
'ninja-build'
'ccache'
'python-is-python3'
'bison'
'byacc'
'flex'
'binutils-dev'
'libiberty-dev'
'curl'
'git'
'zip'
'unzip'
'autopoint'
'openjdk-8-jdk'
'openjdk-8-jdk-headless'
'maven'
)
sudo apt update
sudo apt-cache policy cmake
sudo DEBIAN_FRONTEND=noninteractive apt install --yes "${packages[@]}"
mkdir -p "${DEFAULT_DIR}"
wget https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.25/ldb_toolchain_gen.sh \
-q -O /tmp/ldb_toolchain_gen.sh
bash /tmp/ldb_toolchain_gen.sh "${DEFAULT_DIR}/ldb-toolchain"
- name: Build
run: |
export DEFAULT_DIR='/opt/doris'
export PATH="${DEFAULT_DIR}/ldb-toolchain/bin:${PATH}"
export PATH="$(find /usr/lib/jvm/java-8-openjdk* -maxdepth 1 -type d -name 'bin'):${PATH}"
export JAVA_HOME="$(find /usr/lib/jvm/java-8-openjdk* -maxdepth 0)"
export DORIS_TOOLCHAIN=gcc
export CMAKE_POLICY_VERSION_MINIMUM=3.10
export CUSTOM_CMAKE="/usr/local/bin/cmake"
#export TMPDIR=/home/runner/work/doris/doris/.tmp
#export TMP=$TMPDIR
#export TEMP=$TMPDIR
#mkdir -p $TMPDIR
df -h
echo $TMPDIR
echo $RUNNER_TEMP
cd thirdparty
#./build-thirdparty.sh -j "$(nproc)"
./build-thirdparty.sh -j 2
build_macos:
name: Build Third Party Libraries (macOS)
needs: changes
if: ${{ needs.changes.outputs.thirdparty_changes == 'true' }}
runs-on: macos-15
env:
ENABLE_THIRDPARTY_CCACHE: 'ON'
# thrift's configure finds the dotnet these images ship, so `make` runs
# `dotnet build -c Release` for lib/netstd. The build itself takes seconds, and
# then the compiler server it leaves behind holds the stdout it inherited for its
# full 10 minute keep-alive while nothing happens. Measured in
# apache/doris-thirdparty run 31988123966: 600.03s on macos-14 and 598.79s on
# macos-15-intel between "Build succeeded" and "Making install in compiler/cpp",
# against 0.01s on Linux. Do not start a shared compiler server, and do not keep
# MSBuild worker nodes around either.
UseSharedCompilation: 'false'
MSBUILDDISABLENODEREUSE: '1'
DOTNET_CLI_TELEMETRY_OPTOUT: '1'
DOTNET_NOLOGO: '1'
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v4
# ccache-action is vendored as a submodule and the plain checkout above does not
# fetch it. Initialise only this one; `submodules: recursive` would also clone
# contrib/clucene, which a third party build does not need.
- name: Checkout ccache-action
run: git submodule update --init .github/actions/ccache-action
# This build is cold every time, so changing one package recompiles all ~80 of
# them. build-thirdparty.sh routes the cmake-based packages through ccache when
# ENABLE_THIRDPARTY_CCACHE is on. Note that a cache saved by a pull request run
# is only visible to that same pull request, so this pays off across pushes to
# one branch; sharing it across pull requests needs a run on master.
- name: Ccache ${{ github.ref }}
uses: ./.github/actions/ccache-action
with:
key: THIRDPARTY-macOS
max-size: "1G"
restore-keys: THIRDPARTY-macOS-
- name: Download
run: |
cd thirdparty
curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-source.tgz \
-o doris-thirdparty-source.tgz
tar -zxvf doris-thirdparty-source.tgz
- name: Prepare
run: |
packages=(
'm4'
'automake'
'autoconf'
'libtool'
'pkg-config'
'texinfo'
'coreutils'
'gnu-getopt'
'python@3'
'ninja'
'ccache'
'bison'
'byacc'
'gettext'
'wget'
'pcre'
'openjdk@17'
'maven'
'node'
'llvm@20'
)
# Install packages except cmake
brew install "${packages[@]}" || true
# Install specific version of cmake
brew unlink cmake || true
wget https://github.com/Kitware/CMake/releases/download/v3.25.3/cmake-3.25.3-macos-universal.tar.gz
tar -xzf cmake-3.25.3-macos-universal.tar.gz
sudo cp -r cmake-3.25.3-macos-universal/CMake.app/Contents/* /usr/local/
cmake --version
- name: Build
run: |
export MACOSX_DEPLOYMENT_TARGET=12.0
export CMAKE_POLICY_VERSION_MINIMUM=3.10
export CUSTOM_CMAKE="/usr/local/bin/cmake"
df -h
echo $TMPDIR
echo $RUNNER_TEMP
cd thirdparty
#./build-thirdparty.sh -j "$(nproc)"
./build-thirdparty.sh -j "$(nproc)"
build_macos_arm64:
name: Build Third Party Libraries (macOS-arm64)
needs: changes
if: ${{ needs.changes.outputs.thirdparty_changes == 'true' }}
runs-on: macos-14
env:
ENABLE_THIRDPARTY_CCACHE: 'ON'
# thrift's configure finds the dotnet these images ship, so `make` runs
# `dotnet build -c Release` for lib/netstd. The build itself takes seconds, and
# then the compiler server it leaves behind holds the stdout it inherited for its
# full 10 minute keep-alive while nothing happens. Measured in
# apache/doris-thirdparty run 31988123966: 600.03s on macos-14 and 598.79s on
# macos-15-intel between "Build succeeded" and "Making install in compiler/cpp",
# against 0.01s on Linux. Do not start a shared compiler server, and do not keep
# MSBuild worker nodes around either.
UseSharedCompilation: 'false'
MSBUILDDISABLENODEREUSE: '1'
DOTNET_CLI_TELEMETRY_OPTOUT: '1'
DOTNET_NOLOGO: '1'
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v4
# ccache-action is vendored as a submodule and the plain checkout above does not
# fetch it. Initialise only this one; `submodules: recursive` would also clone
# contrib/clucene, which a third party build does not need.
- name: Checkout ccache-action
run: git submodule update --init .github/actions/ccache-action
# This build is cold every time, so changing one package recompiles all ~80 of
# them. build-thirdparty.sh routes the cmake-based packages through ccache when
# ENABLE_THIRDPARTY_CCACHE is on. Note that a cache saved by a pull request run
# is only visible to that same pull request, so this pays off across pushes to
# one branch; sharing it across pull requests needs a run on master.
- name: Ccache ${{ github.ref }}
uses: ./.github/actions/ccache-action
with:
key: THIRDPARTY-macOS-arm64
max-size: "1G"
restore-keys: THIRDPARTY-macOS-arm64-
- name: Download
run: |
cd thirdparty
curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-source.tgz \
-o doris-thirdparty-source.tgz
tar -zxvf doris-thirdparty-source.tgz
- name: Prepare
run: |
packages=(
'm4'
'automake'
'autoconf'
'libtool'
'pkg-config'
'texinfo'
'coreutils'
'gnu-getopt'
'python@3'
'ninja'
'ccache'
'bison'
'byacc'
'gettext'
'wget'
'pcre'
'openjdk@17'
'maven'
'node'
'llvm@20'
)
# Install packages except cmake
brew install "${packages[@]}" || true
# Install specific version of cmake
brew unlink cmake || true
wget https://github.com/Kitware/CMake/releases/download/v3.25.3/cmake-3.25.3-macos-universal.tar.gz
tar -xzf cmake-3.25.3-macos-universal.tar.gz
sudo cp -r cmake-3.25.3-macos-universal/CMake.app/Contents/* /usr/local/
cmake --version
- name: Build
run: |
export MACOSX_DEPLOYMENT_TARGET=12.0
export CMAKE_POLICY_VERSION_MINIMUM=3.10
export CUSTOM_CMAKE="/usr/local/bin/cmake"
df -h
echo $TMPDIR
echo $RUNNER_TEMP
cd thirdparty
#./build-thirdparty.sh -j "$(nproc)"
./build-thirdparty.sh -j 2