github-actions[bot] commented on code in PR #66313:
URL: https://github.com/apache/doris/pull/66313#discussion_r3701254453


##########
docker/thirdparties/docker-compose/hive/scripts/hive-module-lib.sh:
##########
@@ -22,27 +22,39 @@ set -eo pipefail
 . /mnt/scripts/hive-common-lib.sh
 
 BOOTSTRAP_GROUPS="$(bootstrap_normalize_groups "${HIVE_BOOTSTRAP_GROUPS:-}")"
-DEFAULT_MODULES=(default multi_catalog partition_type statistics tvf 
regression test preinstalled_hql view)
+DEFAULT_MODULES=(default multi_catalog partition_type statistics tvf 
regression test preinstalled_hql view paimon_hms)
 LAST_REFRESH_DETAIL=""
 HIVE_HQL_PARALLEL="${HIVE_HQL_PARALLEL:-${LOAD_PARALLEL}}"
 
 ensure_hive_state_layout
 
+# The Paimon HMS tables need the Paimon storage handler and the object storage
+# credentials that only the Hive3 stack is configured with, so the module opts
+# in via the same flag the settings env files carry.
+paimon_hms_enabled() {
+    [[ "${enablePaimonHms:-false}" == "true" ]]
+}
+
 normalize_hive_modules() {
     local raw_modules="${1:-}"
     local cleaned_modules="${raw_modules// /}"
     local module=""
     local normalized=()
 
     if [[ -z "${cleaned_modules}" || "${cleaned_modules}" == "all" ]]; then
-        printf '%s\n' "${DEFAULT_MODULES[@]}"
+        for module in "${DEFAULT_MODULES[@]}"; do
+            if [[ "${module}" == "paimon_hms" ]] && ! paimon_hms_enabled; then
+                continue
+            fi
+            echo "${module}"
+        done
         return 0
     fi
 
     IFS=',' read -r -a normalized <<<"${cleaned_modules}"
     for module in "${normalized[@]}"; do
         case "${module}" in
-        
default|multi_catalog|partition_type|statistics|tvf|regression|test|preinstalled_hql|view)
+        
default|multi_catalog|partition_type|statistics|tvf|regression|test|preinstalled_hql|view|paimon_hms)

Review Comment:
   [P2] Keep the explicit Paimon override Hive3-only. This branch accepts 
`paimon_hms` regardless of the feature flag, and `run-thirdparties-docker.sh` 
forwards the same `HIVE_MODULES` to every selected Hive generation. Therefore 
`-c hive2,hive3 --hive-mode refresh --hive-modules paimon_hms` also makes the 
Hive 2.3.2 metastore execute this HQL, although `prepare-hive-data.sh` installs 
only `paimon-hive-connector-3.1-...jar` and Hive2 has none of the Hive3 
object-store configuration; that job fails and aborts the whole launch. Please 
separate Hive3 capability from automatic flag selection: retain the explicit 
override on Hive3, but reject or skip this module for Hive2, and cover both 
generations in the harness.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to