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


##########
regression-test/suites/datatype_p0/complex_types/test_pruned_columns.groovy:
##########
@@ -98,10 +213,102 @@ suite("test_pruned_columns") {
     """
 
     qt_sql6 """
-        select count(element_at(dynamic_attributes['theme_preference'], 
'confidence_score')) from `tbl_test_pruned_columns_map`;
+        select
+            id
+            , element_at(element_at(s, 'data')[2][3], 'b')
+        from `tbl_test_pruned_columns`
+        where element_at(s, 'city') = 'chengdu'
+        order by 1, 2 limit 0, 20;
+    """
+
+    sql "set enable_profile = true"
+    sql "set profile_level = 2"
+    sql "set enable_common_expr_pushdown = true"
+    sql "set enable_prune_nested_column = true"
+
+    def lazyPrunedToken = "lazy_pruned_column_recovery_" + 
UUID.randomUUID().toString()
+    sql """
+        select
+            "${lazyPrunedToken}"
+            , id
+            , element_at(s, 'data')
+        from `tbl_test_pruned_columns`
+        where element_at(s, 'city') = 'chengdu'
+        order by 1 limit 0, 20;
+    """
+
+    def profileAction = new ProfileAction(context)
+    def profileCompletionStateName = "Profile Completion State"
+    def profileCompletionStateComplete = "COMPLETE"
+    def lazyPrunedCounterName = "LazyReadPrunedTime"
+    def lazyPrunedProfile = ""
+    def lazyPrunedProfileState = ""
+    for (int attempt = 0; attempt < 60; attempt++) {
+        for (def profileItem : profileAction.getProfileList()) {
+            if (profileItem["Sql 
Statement"].toString().contains(lazyPrunedToken)) {
+                lazyPrunedProfileState = 
profileItem[profileCompletionStateName]?.toString()
+                def currentProfile = 
profileAction.getProfile(profileItem["Profile ID"].toString())
+                if (currentProfile != null && !currentProfile.isEmpty()) {
+                    lazyPrunedProfile = currentProfile
+                }
+                break
+            }
+        }
+        if (lazyPrunedProfileState == profileCompletionStateComplete
+                && lazyPrunedProfile.contains(lazyPrunedCounterName)) {
+            break
+        }
+        Thread.sleep(500)
+    }
+    assertTrue(lazyPrunedProfile != null && !lazyPrunedProfile.isEmpty(),
+            "profile not found for ${lazyPrunedToken}")
+    assertTrue(lazyPrunedProfileState == profileCompletionStateComplete,
+            "profile is not complete for ${lazyPrunedToken}, state: 
${lazyPrunedProfileState}")
+    logger.info("${lazyPrunedToken} profile: ${lazyPrunedProfile}")
+
+    def lazyPrunedTimer = (lazyPrunedProfile =~ 
/${lazyPrunedCounterName}:\s*([0-9.]+)(ns|us|ms|s)/)
+    boolean foundLazyPrunedTimer = false
+    boolean nonZeroLazyPrunedTimer = false
+    while (lazyPrunedTimer.find()) {
+        foundLazyPrunedTimer = true
+        if ((lazyPrunedTimer.group(1) as BigDecimal) > 0) {
+            nonZeroLazyPrunedTimer = true
+            break
+        }
+    }
+    assertTrue(foundLazyPrunedTimer,
+            "LazyReadPrunedTime not found in profile for ${lazyPrunedToken}")
+    assertTrue(nonZeroLazyPrunedTimer,
+            "LazyReadPrunedTime is zero in profile for ${lazyPrunedToken}: 
${lazyPrunedProfile}")
+
+    qt_sql6_1 """
+        select
+            id
+            , element_at(element_at(s, 'data')[2][3], 'b')
+        from `tbl_test_pruned_columns`
+        where element_at(s, 'city') = 'chengdu'
+        order by 1, 2 limit 100, 20;
     """
 
+    qt_sql6_2 """
+        select
+            id
+            , element_at(element_at(s, 'data')[2][3], 'b')
+        from `tbl_test_pruned_columns`
+        where element_at(s, 'city') = 'chengdu'
+        order by 1 desc, 2 limit 0, 20;
+    """
+
+    sql "set enable_profile = false"
+    sql "unset variable profile_level"
+    sql "set enable_common_expr_pushdown = false"
+    sql "set enable_prune_nested_column = false"

Review Comment:
   This reset leaves the remaining complex-column checks outside the path this 
PR is trying to protect. `enablePruneNestedColumns` now defaults to true and is 
forwarded to BE, but `qt_sql7`, `qt_sql8`, and the light-schema `qt_sql9` all 
run after this line sets `enable_prune_nested_column=false`, so they only 
validate the non-pruned fallback. The earlier thread about 
`qt_sql6_1`/`qt_sql6_2` is fixed because those queries moved before the reset; 
please restore the default or set this back to true before the later 
map/light-schema checks so the regression coverage still exercises 
nested-column pruning.



-- 
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