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

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 7b417605e27 [fix](test) make hive compress split assertion BE-aware 
(#60947)
7b417605e27 is described below

commit 7b417605e2769aded2b23082aff857280756ab79
Author: Socrates <[email protected]>
AuthorDate: Tue Mar 3 23:59:59 2026 +0800

    [fix](test) make hive compress split assertion BE-aware (#60947)
    
    ### What problem does this PR solve?
    
    Problem Summary:
    `external_table_p0/hive/test_hive_compress_type.groovy` had a fixed
    split assertion (`28`) for multi-BE, which is not stable across
    environments.
    The split behavior for COUNT pushdown depends on both `backendNum` and
    `parallel_fragment_exec_instance_num`, so internal 3BE pipeline could
    still produce `16` and fail.
    
    This PR makes the assertion BE-aware and deterministic:
    - read `backendNum` via `show backends`
    - read `parallel_fragment_exec_instance_num` via `show variables`
    - compute expected split count with the same condition as FE logic
    - add comments to explain why this check differs between environments
---
 .../hive/test_hive_compress_type.groovy            | 33 +++++++++++++---------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git 
a/regression-test/suites/external_table_p0/hive/test_hive_compress_type.groovy 
b/regression-test/suites/external_table_p0/hive/test_hive_compress_type.groovy
index 3dcab8869f0..8668e148a63 100644
--- 
a/regression-test/suites/external_table_p0/hive/test_hive_compress_type.groovy
+++ 
b/regression-test/suites/external_table_p0/hive/test_hive_compress_type.groovy
@@ -24,8 +24,14 @@ suite("test_hive_compress_type", 
"p0,external,hive,external_docker,external_dock
     }
 
     def backends = sql """show backends"""
-    def backendNum = backends.size();
-    logger.info("get backendNum:" + backendNum);    
+    def backendNum = backends.size()
+    logger.info("get backendNum: ${backendNum}")
+    // `parallel_fragment_exec_instance_num` may be displayed as
+    // `deprecated_parallel_fragment_exec_instance_num` in newer branches.
+    def parallelExecInstanceRows = sql("show variables like 
'%parallel_fragment_exec_instance_num%'")
+    assertTrue(parallelExecInstanceRows.size() > 0)
+    def parallelExecInstanceNum = (parallelExecInstanceRows[0][1] as 
String).toInteger()
+    logger.info("get ${parallelExecInstanceRows[0][0]}: 
${parallelExecInstanceNum}")
 
     for (String hivePrefix : ["hive3"]) {
         String hms_port = context.config.otherConfigs.get(hivePrefix + 
"HmsPort")
@@ -41,18 +47,17 @@ suite("test_hive_compress_type", 
"p0,external,hive,external_docker,external_dock
 
         // table test_compress_partitioned has 6 partitions with different 
compressed file: plain, gzip, bzip2, deflate
         sql """set file_split_size=0"""
-        if (backendNum == 1) {
-            explain {
-                sql("select count(*) from test_compress_partitioned")
-                contains "inputSplitNum=16, totalFileSize=734675596, 
scanRanges=16"
-                contains "partition=8/8"
-            }
-        } else {
-            explain {
-                sql("select count(*) from test_compress_partitioned")
-                contains "inputSplitNum=28, totalFileSize=734675596, 
scanRanges=28"
-                contains "partition=8/8"
-            }
+        // COUNT pushdown split behavior depends on:
+        // totalFileNum < parallel_fragment_exec_instance_num * backendNum
+        // test_compress_partitioned currently has 16 files.
+        def expectedSplitNum = 16
+        if (backendNum > 1) {
+            expectedSplitNum = (16 < parallelExecInstanceNum * backendNum) ? 
28 : 16
+        }
+        explain {
+            sql("select count(*) from test_compress_partitioned")
+            contains "inputSplitNum=${expectedSplitNum}, 
totalFileSize=734675596, scanRanges=${expectedSplitNum}"
+            contains "partition=8/8"
         }
         qt_q21 """select count(*) from test_compress_partitioned where 
dt="gzip" or dt="mix""""
         qt_q22 """select count(*) from test_compress_partitioned"""


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

Reply via email to