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


##########
regression-test/suites/datatype_p0/timestamptz/test_timestamptz_sort.groovy:
##########
@@ -50,4 +50,40 @@ suite("test_timestamptz_sort") {
     qt_sort_offset_limit """
         select * from timestamptz_sort_test order by tz asc limit 1 offset 1;
     """
+
+    sql " set enable_nereids_planner = true; "
+    sql " set enable_fallback_to_original_planner = false; "
+
+    sql """
+        DROP TABLE IF EXISTS `timestamptz_sort_cast_union_test`;
+    """
+    sql """
+        CREATE TABLE timestamptz_sort_cast_union_test (
+            id INT,
+            tz0 timestamptz(0),
+            tz6 timestamptz(6)
+        ) DISTRIBUTED BY HASH(id) BUCKETS 4 PROPERTIES ("replication_num" = 
"1");
+    """
+
+    sql """
+        insert into timestamptz_sort_cast_union_test values
+        (1, cast("2024-01-01 00:00:00 +08:00" as timestamptz(0)), 
cast("2024-01-01 00:00:00.000001 +08:00" as timestamptz(6))),
+        (2, cast("2023-12-31 23:00:00 +08:00" as timestamptz(0)), 
cast("2024-01-01 01:30:00.123456 +08:00" as timestamptz(6)));
+    """
+
+    qt_sort_cast_union_topn """

Review Comment:
   This test does not reliably exercise the TopN runtime-predicate path that 
failed before this PR. `TopnFilterPushDownVisitor` only adds the filter when 
`max(rowCount, 1) * topn_filter_ratio > limit + offset`; with the default ratio 
`0.5`, this two-row table and `limit 4` can skip generating `TTopnFilterDesc`, 
so the query would pass even without the `RuntimePredicate::_init()` change. 
Please force the filter for this regression, e.g. set `topn_filter_ratio` high 
enough before the query, so the pre-fix build would reproduce the 
INTERNAL_ERROR.



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