github-actions[bot] commented on code in PR #59263:
URL: https://github.com/apache/doris/pull/59263#discussion_r3488062807
##########
regression-test/suites/datatype_p0/complex_types/test_pruned_columns.groovy:
##########
@@ -98,10 +213,86 @@ 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;
+ """
+
+ Thread.sleep(1000)
+ def profileAction = new ProfileAction(context)
+ def lazyPrunedProfile = ""
+ for (def profileItem : profileAction.getProfileList()) {
+ if (profileItem["Sql Statement"].toString().contains(lazyPrunedToken))
{
+ lazyPrunedProfile = profileAction.getProfile(profileItem["Profile
ID"].toString())
+ break
+ }
+ }
+ assertTrue(lazyPrunedProfile != null && !lazyPrunedProfile.isEmpty(),
+ "profile not found for ${lazyPrunedToken}")
+ logger.info("${lazyPrunedToken} profile: ${lazyPrunedProfile}")
+
+ def lazyPrunedTimer = (lazyPrunedProfile =~
/LazyReadPrunedTime:\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}")
+
+ sql "set enable_profile = false"
+ sql "unset variable profile_level"
+ sql "set enable_common_expr_pushdown = false"
+ sql "set enable_prune_nested_column = false"
+
+ qt_sql6_1 """
Review Comment:
These two new result checks run after the suite disables both gates that are
required to enter the lazy-pruned recovery path. Lines 270-271 set
`enable_common_expr_pushdown=false` and `enable_prune_nested_column=false`, but
the BE only adds a column to `_support_lazy_read_pruned_columns` when it is a
common-expression column and nested pruning is enabled. That means `qt_sql6_1`
and `qt_sql6_2` validate the normal reader, not the new lazy recovery for
offset and reverse-order selections. Please keep these flags enabled through
these two queries, or put the required `SET_VAR` settings on the queries and
restore the session afterward.
##########
regression-test/suites/datatype_p0/complex_types/test_pruned_columns.groovy:
##########
@@ -98,10 +213,86 @@ 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;
+ """
+
+ Thread.sleep(1000)
Review Comment:
A fixed one-second sleep is not enough to make this profile assertion
deterministic. The profile list exposes `Profile Completion State`, and FE
reports RUNNING/COLLECTING until the BE fragment profiles have been merged; if
this fetches the profile during that window, `LazyReadPrunedTime` can still be
missing or zero even though the query eventually completes normally. Please
poll the UUID-tagged profile until `Profile Completion State == COMPLETE` (and
ideally until `LazyReadPrunedTime` is present) before asserting the timer value.
--
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]