-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[fix](thirdparty) order Paimon codec dependencies #67158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| #!/usr/bin/env bash | ||
| # 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. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." &>/dev/null && pwd)" | ||
| EXTERNAL_FE_CONF="${ROOT}/regression-test/pipeline/external/conf/fe.conf" | ||
| # shellcheck disable=SC2016 # Match the literal option before fe.conf expands DORIS_HOME. | ||
| JNI_LIBRARY_OPTION='-Darrow.adbc.driver.jni.library.path=${DORIS_HOME}/lib' | ||
|
|
||
| # External Regression replaces the packaged FE configuration instead of merging it. | ||
| # Keep the JNI override in that replacement so ADBC cannot fall back to the jar binary. | ||
| java_opts_assignment="$(grep '^JAVA_OPTS_FOR_JDK_17=' "${EXTERNAL_FE_CONF}" || true)" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] Validate the runtime-effective JDK-17 assignment
|
||
| if [[ " ${java_opts_assignment} " != *" ${JNI_LIBRARY_OPTION} "* ]]; then | ||
| echo "FAIL: ${EXTERNAL_FE_CONF} drops the packaged ADBC JNI library path." >&2 | ||
| echo "Add ${JNI_LIBRARY_OPTION} to its FE JVM options." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "PASS" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| #!/usr/bin/env bash | ||
| # 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. | ||
|
|
||
| set -eo pipefail | ||
|
|
||
| ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd)" | ||
|
|
||
| fail() { | ||
| echo "FAIL: $*" >&2 | ||
| exit 1 | ||
| } | ||
|
|
||
| tmpdir="$(mktemp -d)" | ||
| trap 'rm -rf "${tmpdir}"' EXIT | ||
|
|
||
| fixture="${tmpdir}/paimon-codec-dependency" | ||
| focused_patch="${fixture}/codec-dependency.patch" | ||
| mkdir -p "${fixture}/src/paimon" | ||
| { | ||
| printf '%s\n' 'add_paimon_lib(paimon' | ||
| printf '%s\n' ' SOURCES' | ||
| printf '%s\n' ' ${PAIMON_COMMON_SRCS}' | ||
| printf '%s\n' ' ${PAIMON_CORE_SRCS}' | ||
| printf '%s\n' ' DEPENDENCIES' | ||
| printf '%s\n' ' arrow' | ||
| printf '%s\n' ' tbb' | ||
| printf '%s\n' ' glog' | ||
| printf '%s\n' ' fmt' | ||
| printf '%s\n' ' roaring_bitmap' | ||
| printf '%s\n' ' xxhash' | ||
| printf '%s\n' ' Threads::Threads' | ||
| printf '%s\n' ' RapidJSON' | ||
| printf '%s\n' ' STATIC_LINK_LIBS' | ||
| printf '%s\n' ' arrow)' | ||
| } >"${fixture}/src/paimon/CMakeLists.txt" | ||
|
|
||
| awk ' | ||
| /^diff --git / { | ||
| if (found) { | ||
| exit | ||
| } | ||
| if ($0 == "diff --git a/src/paimon/CMakeLists.txt b/src/paimon/CMakeLists.txt") { | ||
| found = 1 | ||
| } | ||
| } | ||
| found { print } | ||
| ' "${ROOT}/patches/paimon-cpp-buildutils-static-deps.patch" >"${focused_patch}" | ||
| [[ -s "${focused_patch}" ]] || fail "the Paimon codec dependency patch is missing" | ||
| ( | ||
| cd "${fixture}" | ||
| patch -s -p1 <"${focused_patch}" | ||
| ) || fail "the Paimon codec dependency patch did not apply" | ||
|
|
||
| dependencies="$(sed -n '/^[[:space:]]*DEPENDENCIES$/,/^[[:space:]]*STATIC_LINK_LIBS$/p' \ | ||
| "${fixture}/src/paimon/CMakeLists.txt")" | ||
| grep -Eq '^[[:space:]]+zstd$' <<<"${dependencies}" || | ||
| fail "paimon_objlib does not wait for the ZSTD headers" | ||
| grep -Eq '^[[:space:]]+snappy$' <<<"${dependencies}" || | ||
| fail "paimon_objlib does not wait for the Snappy headers" | ||
| grep -Eq '^[[:space:]]+lz4$' <<<"${dependencies}" || | ||
| fail "paimon_objlib does not wait for the LZ4 headers" | ||
|
|
||
| echo "PASS" |
Uh oh!
There was an error while loading. Please reload this page.