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


##########
regression-test/suites/nereids_rules_p0/column_pruning/topn_expr_pullup.groovy:
##########
@@ -0,0 +1,161 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite("topn_expr_pullup") {
+    sql """ set topn_lazy_materialization_threshold=1024; """
+    sql """ DROP TABLE IF EXISTS tep_tbl """
+    sql """
+        CREATE TABLE tep_tbl (
+            id          INT,
+            str_col     STRING NULL,
+            struct_col  STRUCT<city: STRING, zip: INT> NULL,
+            arr_col     ARRAY<INT> NULL,
+            map_col     MAP<STRING, INT> NULL,
+            int_col     INT NULL
+        ) ENGINE = OLAP
+        DUPLICATE KEY(id)
+        DISTRIBUTED BY HASH(id) BUCKETS 1
+        PROPERTIES ("replication_allocation" = "tag.location.default: 1")
+    """
+    sql """ INSERT INTO tep_tbl VALUES
+        (1, 'hello', named_struct('city', 'NYC', 'zip', 10001), [1, 2, 3], 
{'a': 1, 'b': 2}, 10),
+        (2, 'world', named_struct('city', 'LA', 'zip', 90001), [4, 5], {'x': 
3}, 20),
+        (3, 'doris', named_struct('city', 'SF', 'zip', 94101), [6], {'y': 5}, 
30)
+    """
+
+    // =============================================
+    // Test 1: STRUCT PPD — expression pulled above TopN + lazy mat
+    // =============================================
+    explain {
+        sql """ select id, struct_element(struct_col, 'city') as city
+            from tep_tbl order by id limit 3 """
+        contains("VMaterializeNode")
+        contains("row_ids: [__DORIS_GLOBAL_ROWID_COL__tep_tbl]")
+    }
+    qt_struct_ppd """ select id, struct_element(struct_col, 'city') as city

Review Comment:
   This new suite introduces multiple `qt_` blocks, but there is no 
corresponding 
`regression-test/data/nereids_rules_p0/column_pruning/topn_expr_pullup.out` 
file in the PR. The regression runner expects every `qt_` label to have 
generated output, so this suite will fail before validating the new TopN 
expression pull-up behavior. Please run the regression case and add the 
generated `.out` file for all labels in this suite.



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