This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new fa5578c2c8f branch-4.1: [improvement](regression) Align regression 
framework arrow/netty with fe-core and target JDK17 #64677 (#65462)
fa5578c2c8f is described below

commit fa5578c2c8f5f9f999a7b11f55b6e0f6c19a6d06
Author: Calvin Kirs <[email protected]>
AuthorDate: Mon Jul 13 14:09:12 2026 +0800

    branch-4.1: [improvement](regression) Align regression framework 
arrow/netty with fe-core and target JDK17 #64677 (#65462)
    
    #64677
    
    Co-authored-by: Dongyang Li <[email protected]>
---
 regression-test/framework/pom.xml                  | 11 ++++----
 regression-test/pipeline/cloud_p0/run.sh           |  5 +++-
 regression-test/pipeline/common/doris-utils.sh     |  8 +++---
 regression-test/pipeline/vault_p0/run.sh           |  5 +++-
 .../test_nereids_show_create_storage_vault.groovy  |  4 +--
 run-regression-test.sh                             | 31 ++++++++++++++++++++--
 6 files changed, 48 insertions(+), 16 deletions(-)

diff --git a/regression-test/framework/pom.xml 
b/regression-test/framework/pom.xml
index 930810243eb..9efd3b6fe97 100644
--- a/regression-test/framework/pom.xml
+++ b/regression-test/framework/pom.xml
@@ -67,16 +67,17 @@ under the License.
     <properties>
         <doris.home>${basedir}/../../</doris.home>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
         <revision>1.0-SNAPSHOT</revision>
         <project.scm.id>github</project.scm.id>
         <groovy.version>4.0.19</groovy.version>
         <antlr.version>4.9.3</antlr.version>
         <hadoop.version>2.8.0</hadoop.version>
         <aws-java-sdk-s3.version>1.11.95</aws-java-sdk-s3.version>
-        <!-- Arrow 18 only supports jdk17 -->
-        <arrow.version>17.0.0</arrow.version>
+        <!-- Aligned with fe (fe/pom.xml). Arrow 18+ requires jdk17; the 
regression
+             framework now targets jdk17, so this matches fe-core. -->
+        <arrow.version>19.0.0</arrow.version>
     </properties>
     <build>
         <plugins>
@@ -417,7 +418,7 @@ under the License.
         <dependency>
             <groupId>io.netty</groupId>
             <artifactId>netty-all</artifactId>
-            <version>4.1.104.Final</version>
+            <version>4.2.15.Final</version>
         </dependency>
         <dependency>
             <groupId>org.awaitility</groupId>
diff --git a/regression-test/pipeline/cloud_p0/run.sh 
b/regression-test/pipeline/cloud_p0/run.sh
index 776bd96726e..2e634946bd8 100644
--- a/regression-test/pipeline/cloud_p0/run.sh
+++ b/regression-test/pipeline/cloud_p0/run.sh
@@ -72,8 +72,11 @@ run() {
     sed -i 
"s/oss-cn-hongkong.aliyuncs.com/oss-cn-hongkong-internal.aliyuncs.com/" 
"${teamcity_build_checkoutDir}"/docker/thirdparties/custom_settings.env
     if bash 
"${teamcity_build_checkoutDir}"/docker/thirdparties/run-thirdparties-docker.sh 
--stop; then echo; fi
     if bash 
"${teamcity_build_checkoutDir}"/docker/thirdparties/run-thirdparties-docker.sh 
-c kafka; then echo; else echo "ERROR: start kafka docker failed"; fi
-    JAVA_HOME="$(find /usr/lib/jvm -maxdepth 1 -type d -name 'java-8-*' | sed 
-n '1p')"
+    # Run the regression suite under JDK 17: the Arrow Flight SQL JDBC driver 
(arrow 19)
+    # is Java 11+ bytecode and cannot be loaded by a JDK 8 runtime.
+    JAVA_HOME="$(find /usr/lib/jvm -maxdepth 1 -type d -name 'java-17-*' | sed 
-n '1p')"
     export JAVA_HOME
+    export PATH="${JAVA_HOME}/bin:${PATH}"
     if "${teamcity_build_checkoutDir}"/run-regression-test.sh \
         --teamcity \
         --run \
diff --git a/regression-test/pipeline/common/doris-utils.sh 
b/regression-test/pipeline/common/doris-utils.sh
index a23e3d43e60..d53ec6be3d0 100644
--- a/regression-test/pipeline/common/doris-utils.sh
+++ b/regression-test/pipeline/common/doris-utils.sh
@@ -972,9 +972,9 @@ prepare_java_udf() {
     # custom_lib相关的case需要在fe启动前把编译好的jar放到 $DORIS_HOME/fe/custom_lib/
     install_java
     install_maven
-    OLD_JAVA_HOME=${JAVA_HOME}
-    JAVA_HOME="$(find /usr/lib/jvm -maxdepth 1 -type d -name 'java-8-*' | sed 
-n '1p')"
-    export JAVA_HOME
+    # Build with the ambient JDK (>=17 in CI): the regression framework is 
compiled with it,
+    # while run-regression-test.sh internally switches to JDK 8 only for the 
Java UDF module
+    # (which must stay Java 8 for the BE embedded JVM).
     bash "${DORIS_HOME}"/../run-regression-test.sh --clean
     if bash "${DORIS_HOME}"/../run-regression-test.sh --compile ||
         bash "${DORIS_HOME}"/../run-regression-test.sh --compile ||
@@ -983,8 +983,6 @@ prepare_java_udf() {
     else
         echo "ERROR: failed to compile java udf"
     fi
-    JAVA_HOME=${OLD_JAVA_HOME}
-    export JAVA_HOME
 
     if ls "${DORIS_HOME}"/fe/custom_lib/*.jar &&
         ls "${DORIS_HOME}"/be/custom_lib/*.jar; then
diff --git a/regression-test/pipeline/vault_p0/run.sh 
b/regression-test/pipeline/vault_p0/run.sh
index 9a86d3cda20..a8a252b554f 100644
--- a/regression-test/pipeline/vault_p0/run.sh
+++ b/regression-test/pipeline/vault_p0/run.sh
@@ -114,8 +114,11 @@ services:
   network_mode: "host"
 '
     if echo "${docker_compose_hdfs_yaml}" >docker-compose.yaml && 
docker-compose up -d; then echo; else echo "ERROR: start hdfs docker failed"; fi
-    JAVA_HOME="$(find /usr/lib/jvm -maxdepth 1 -type d -name 'java-8-*' | sed 
-n '1p')"
+    # Run the regression suite under JDK 17: the Arrow Flight SQL JDBC driver 
(arrow 19)
+    # is Java 11+ bytecode and cannot be loaded by a JDK 8 runtime.
+    JAVA_HOME="$(find /usr/lib/jvm -maxdepth 1 -type d -name 'java-17-*' | sed 
-n '1p')"
     export JAVA_HOME
+    export PATH="${JAVA_HOME}/bin:${PATH}"
     if "${teamcity_build_checkoutDir}"/run-regression-test.sh \
         --teamcity \
         --run \
diff --git 
a/regression-test/suites/vault_p0/create/test_nereids_show_create_storage_vault.groovy
 
b/regression-test/suites/vault_p0/create/test_nereids_show_create_storage_vault.groovy
index fc38f3b22a3..2e1504218fd 100644
--- 
a/regression-test/suites/vault_p0/create/test_nereids_show_create_storage_vault.groovy
+++ 
b/regression-test/suites/vault_p0/create/test_nereids_show_create_storage_vault.groovy
@@ -83,11 +83,11 @@ suite("test_show_create_storage_vault_command") {
     def hdfsVaultInfo = try_sql """SHOW CREATE STORAGE VAULT 
${hdfsVaultName}"""
     def s3VaultInfo = try_sql """SHOW CREATE STORAGE VAULT ${s3VaultName}"""
 
-    if (hdfsVaultInfo.size == 1) {
+    if (hdfsVaultInfo.size() == 1) {
         hdfsVaultExist = true
     }
 
-    if (s3VaultInfo.size == 1) {
+    if (s3VaultInfo.size() == 1) {
         s3VaultExist = true
     }
 
diff --git a/run-regression-test.sh b/run-regression-test.sh
index a026822ca18..7b15bbddae0 100755
--- a/run-regression-test.sh
+++ b/run-regression-test.sh
@@ -184,8 +184,35 @@ if ! test -f ${RUN_JAR:+${RUN_JAR}}; then
 
     echo "===== BUILD JAVA_UDF_SRC TO GENERATE JAR ====="
     mkdir -p "${DORIS_HOME}"/regression-test/suites/javaudf_p0/jars
-    cd "${DORIS_HOME}"/regression-test/java-udf-src
-    "${MVN_CMD}" package
+    cd "${DORIS_HOME}"/regression-test/java-udf-src || { echo "Failed to 
change directory to java-udf-src"; exit 1; }
+
+    # The Java UDF jar must be built with JDK 8 (source/target 8, loaded by 
the BE embedded
+    # JVM), while the framework above is built with the ambient JDK (>=17 in 
CI). Switch to a
+    # JDK 8 just for this module, falling back to the ambient JDK if none is 
installed
+    # (e.g. local dev boxes).
+    udf_prev_java_home="${JAVA_HOME:-}"
+    udf_jdk8_home="$(find /usr/lib/jvm -maxdepth 1 -type d -name 'java-8-*' 
2>/dev/null | sed -n '1p')"
+    if [[ -n "${udf_jdk8_home}" ]]; then
+        echo "Building Java UDF with JDK 8 at ${udf_jdk8_home}"
+        export JAVA_HOME="${udf_jdk8_home}"
+    else
+        echo "WARNING: no JDK 8 found under /usr/lib/jvm; building Java UDF 
with ${JAVA_HOME:-the current JDK}"
+    fi
+
+    udf_build_rc=0
+    "${MVN_CMD}" package || udf_build_rc=1
+
+    # Restore the framework JDK regardless of the UDF build result.
+    if [[ -n "${udf_prev_java_home}" ]]; then
+        export JAVA_HOME="${udf_prev_java_home}"
+    else
+        unset JAVA_HOME
+    fi
+    if [[ "${udf_build_rc}" -ne 0 ]]; then
+        echo "Failed to build UDF package"
+        exit 1
+    fi
+
     cp target/java-udf-case-jar-with-dependencies.jar 
"${DORIS_HOME}"/regression-test/suites/javaudf_p0/jars/
     # be and fe dir is compiled output
     mkdir -p "${DORIS_HOME}"/output/fe/custom_lib/


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to