From a18845b4bc689af35c591e97ef48d8d6ce858738 Mon Sep 17 00:00:00 2001 From: morrySnow <101034200+morrySnow@users.noreply.github.com> Date: Thu, 14 Mar 2024 21:07:34 +0800 Subject: [PATCH] [fix](test) ckbench shape unstable since topn_opt_limit_threshold in fuzzy list (#32256) fix ckbench shape unstable since topn_opt_limit_threshold in fuzzy list --- .../data/nereids_clickbench_shape_p0/query1.out | 2 +- .../data/nereids_clickbench_shape_p0/query10.out | 2 +- .../data/nereids_clickbench_shape_p0/query11.out | 2 +- .../data/nereids_clickbench_shape_p0/query12.out | 2 +- .../data/nereids_clickbench_shape_p0/query13.out | 2 +- .../data/nereids_clickbench_shape_p0/query14.out | 2 +- .../data/nereids_clickbench_shape_p0/query15.out | 2 +- .../data/nereids_clickbench_shape_p0/query16.out | 2 +- .../data/nereids_clickbench_shape_p0/query17.out | 2 +- .../data/nereids_clickbench_shape_p0/query18.out | 2 +- .../data/nereids_clickbench_shape_p0/query19.out | 2 +- .../data/nereids_clickbench_shape_p0/query2.out | 2 +- .../data/nereids_clickbench_shape_p0/query20.out | 2 +- .../data/nereids_clickbench_shape_p0/query21.out | 2 +- .../data/nereids_clickbench_shape_p0/query22.out | 2 +- .../data/nereids_clickbench_shape_p0/query23.out | 2 +- .../data/nereids_clickbench_shape_p0/query24.out | 2 +- .../data/nereids_clickbench_shape_p0/query25.out | 2 +- .../data/nereids_clickbench_shape_p0/query26.out | 2 +- .../data/nereids_clickbench_shape_p0/query27.out | 2 +- .../data/nereids_clickbench_shape_p0/query28.out | 2 +- .../data/nereids_clickbench_shape_p0/query29.out | 2 +- .../data/nereids_clickbench_shape_p0/query3.out | 2 +- .../data/nereids_clickbench_shape_p0/query30.out | 2 +- .../data/nereids_clickbench_shape_p0/query31.out | 2 +- .../data/nereids_clickbench_shape_p0/query32.out | 2 +- .../data/nereids_clickbench_shape_p0/query33.out | 2 +- .../data/nereids_clickbench_shape_p0/query34.out | 2 +- .../data/nereids_clickbench_shape_p0/query35.out | 2 +- .../data/nereids_clickbench_shape_p0/query36.out | 2 +- .../data/nereids_clickbench_shape_p0/query37.out | 2 +- .../data/nereids_clickbench_shape_p0/query38.out | 2 +- .../data/nereids_clickbench_shape_p0/query39.out | 2 +- .../data/nereids_clickbench_shape_p0/query4.out | 2 +- .../data/nereids_clickbench_shape_p0/query40.out | 2 +- .../data/nereids_clickbench_shape_p0/query41.out | 2 +- .../data/nereids_clickbench_shape_p0/query42.out | 2 +- .../data/nereids_clickbench_shape_p0/query43.out | 2 +- .../data/nereids_clickbench_shape_p0/query5.out | 2 +- .../data/nereids_clickbench_shape_p0/query6.out | 2 +- .../data/nereids_clickbench_shape_p0/query7.out | 2 +- .../data/nereids_clickbench_shape_p0/query8.out | 2 +- .../data/nereids_clickbench_shape_p0/query9.out | 2 +- .../suites/nereids_clickbench_shape_p0/query1.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query10.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query11.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query12.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query13.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query14.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query15.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query16.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query17.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query18.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query19.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query2.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query20.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query21.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query22.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query23.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query24.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query25.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query26.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query27.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query28.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query29.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query3.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query30.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query31.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query32.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query33.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query34.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query35.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query36.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query37.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query38.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query39.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query4.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query40.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query41.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query42.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query43.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query5.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query6.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query7.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query8.groovy | 7 ++++--- .../suites/nereids_clickbench_shape_p0/query9.groovy | 7 ++++--- 86 files changed, 215 insertions(+), 172 deletions(-) diff --git a/regression-test/data/nereids_clickbench_shape_p0/query1.out b/regression-test/data/nereids_clickbench_shape_p0/query1.out index 140c946b58f574..f98c53e3d5fc4e 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query1.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query1.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_1 -- +-- !ckbench_shape_1 -- PhysicalResultSink --hashAgg[GLOBAL] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query10.out b/regression-test/data/nereids_clickbench_shape_p0/query10.out index 3987a5ecb5241c..c784056436912a 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query10.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query10.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_10 -- +-- !ckbench_shape_10 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query11.out b/regression-test/data/nereids_clickbench_shape_p0/query11.out index c3a969eb06d9e4..4b5e4486d3f4cc 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query11.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query11.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_11 -- +-- !ckbench_shape_11 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query12.out b/regression-test/data/nereids_clickbench_shape_p0/query12.out index 61f1f60130c5ee..10928363a83c02 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query12.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query12.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_12 -- +-- !ckbench_shape_12 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query13.out b/regression-test/data/nereids_clickbench_shape_p0/query13.out index 6f78dbb9dfc831..ce6675dc3bb26e 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query13.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query13.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_13 -- +-- !ckbench_shape_13 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query14.out b/regression-test/data/nereids_clickbench_shape_p0/query14.out index aa271b6d27f2c4..35eedce41b927a 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query14.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query14.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_14 -- +-- !ckbench_shape_14 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query15.out b/regression-test/data/nereids_clickbench_shape_p0/query15.out index 114c108ba72a11..bf7f267f0e47be 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query15.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query15.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_15 -- +-- !ckbench_shape_15 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query16.out b/regression-test/data/nereids_clickbench_shape_p0/query16.out index 8f77e55d7a4d62..a229f5310dfc2d 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query16.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query16.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_16 -- +-- !ckbench_shape_16 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query17.out b/regression-test/data/nereids_clickbench_shape_p0/query17.out index 9d58bcabe0a517..78635481d04652 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query17.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query17.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_17 -- +-- !ckbench_shape_17 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query18.out b/regression-test/data/nereids_clickbench_shape_p0/query18.out index aeb98a77114775..0a03abdf84f4d9 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query18.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query18.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_18 -- +-- !ckbench_shape_18 -- PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query19.out b/regression-test/data/nereids_clickbench_shape_p0/query19.out index 5e4556e203f2d8..7540225b393218 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query19.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query19.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_19 -- +-- !ckbench_shape_19 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query2.out b/regression-test/data/nereids_clickbench_shape_p0/query2.out index 5106d00298ef36..4f4565a083c67b 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query2.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query2.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_2 -- +-- !ckbench_shape_2 -- PhysicalResultSink --hashAgg[GLOBAL] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query20.out b/regression-test/data/nereids_clickbench_shape_p0/query20.out index 74a11d0639b9be..51f1da68b40a5b 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query20.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query20.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_20 -- +-- !ckbench_shape_20 -- PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----PhysicalProject diff --git a/regression-test/data/nereids_clickbench_shape_p0/query21.out b/regression-test/data/nereids_clickbench_shape_p0/query21.out index 6695e7a4f026e4..104d1b4710532a 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query21.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query21.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_21 -- +-- !ckbench_shape_21 -- PhysicalResultSink --hashAgg[GLOBAL] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query22.out b/regression-test/data/nereids_clickbench_shape_p0/query22.out index fec375258d45d9..d5274c3548eb28 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query22.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query22.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_22 -- +-- !ckbench_shape_22 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query23.out b/regression-test/data/nereids_clickbench_shape_p0/query23.out index ecb08ba6074577..76a91b3ad49968 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query23.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query23.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_23 -- +-- !ckbench_shape_23 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query24.out b/regression-test/data/nereids_clickbench_shape_p0/query24.out index 9cacd85803dd98..fd0a2f5b670727 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query24.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query24.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_24 -- +-- !ckbench_shape_24 -- PhysicalDeferMaterializeResultSink --PhysicalDeferMaterializeTopN ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query25.out b/regression-test/data/nereids_clickbench_shape_p0/query25.out index 16acace7064e59..271149db672442 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query25.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query25.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_25 -- +-- !ckbench_shape_25 -- PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query26.out b/regression-test/data/nereids_clickbench_shape_p0/query26.out index 07b70c3395694b..7317f810a3bb23 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query26.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query26.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_26 -- +-- !ckbench_shape_26 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query27.out b/regression-test/data/nereids_clickbench_shape_p0/query27.out index 81fee2d8234e9c..1dbae1e0dc1a8c 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query27.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query27.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_27 -- +-- !ckbench_shape_27 -- PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query28.out b/regression-test/data/nereids_clickbench_shape_p0/query28.out index 338b96ea2a962d..e5cb28eab7aa2b 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query28.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query28.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_28 -- +-- !ckbench_shape_28 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query29.out b/regression-test/data/nereids_clickbench_shape_p0/query29.out index beb53fbc0ada1f..01e642b5b4339f 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query29.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query29.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_29 -- +-- !ckbench_shape_29 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query3.out b/regression-test/data/nereids_clickbench_shape_p0/query3.out index 2a053055183cbf..d4fb562b4fdb3f 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query3.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query3.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_3 -- +-- !ckbench_shape_3 -- PhysicalResultSink --hashAgg[GLOBAL] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query30.out b/regression-test/data/nereids_clickbench_shape_p0/query30.out index 256e01bf4a087d..8a3f753f3dff24 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query30.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query30.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_30 -- +-- !ckbench_shape_30 -- PhysicalResultSink --hashAgg[GLOBAL] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query31.out b/regression-test/data/nereids_clickbench_shape_p0/query31.out index 4588d54889ad0e..a662fac4ef4581 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query31.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query31.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_31 -- +-- !ckbench_shape_31 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query32.out b/regression-test/data/nereids_clickbench_shape_p0/query32.out index bc994d43d43a28..29828472ccab40 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query32.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query32.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_32 -- +-- !ckbench_shape_32 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query33.out b/regression-test/data/nereids_clickbench_shape_p0/query33.out index df1e6047b44391..f47fe46b46005a 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query33.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query33.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_33 -- +-- !ckbench_shape_33 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query34.out b/regression-test/data/nereids_clickbench_shape_p0/query34.out index c0634a10984c82..c2b2ed43e72e9f 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query34.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query34.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_34 -- +-- !ckbench_shape_34 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query35.out b/regression-test/data/nereids_clickbench_shape_p0/query35.out index 90cb80f6ce2a16..7fb8594fbe3977 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query35.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query35.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_35 -- +-- !ckbench_shape_35 -- PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query36.out b/regression-test/data/nereids_clickbench_shape_p0/query36.out index 82bf9c416f93a9..5000e553f81e34 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query36.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query36.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_36 -- +-- !ckbench_shape_36 -- PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query37.out b/regression-test/data/nereids_clickbench_shape_p0/query37.out index c5b0ca06c85f0a..757b4f64df4e98 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query37.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query37.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_37 -- +-- !ckbench_shape_37 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query38.out b/regression-test/data/nereids_clickbench_shape_p0/query38.out index 7f3cf967a56602..37d0392a7b2490 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query38.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query38.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_38 -- +-- !ckbench_shape_38 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query39.out b/regression-test/data/nereids_clickbench_shape_p0/query39.out index cf5f1f1f0a7f2a..89222c0f0d2abe 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query39.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query39.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_39 -- +-- !ckbench_shape_39 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query4.out b/regression-test/data/nereids_clickbench_shape_p0/query4.out index 5722d13a70822e..966b6cb7ecca97 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query4.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query4.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_4 -- +-- !ckbench_shape_4 -- PhysicalResultSink --hashAgg[GLOBAL] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query40.out b/regression-test/data/nereids_clickbench_shape_p0/query40.out index 1acdb05af87124..1218097c179faf 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query40.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query40.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_40 -- +-- !ckbench_shape_40 -- PhysicalResultSink --PhysicalProject ----PhysicalTopN[MERGE_SORT] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query41.out b/regression-test/data/nereids_clickbench_shape_p0/query41.out index 210ae16247f10b..8a7019e5969e79 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query41.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query41.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_41 -- +-- !ckbench_shape_41 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query42.out b/regression-test/data/nereids_clickbench_shape_p0/query42.out index adabcb74980978..b4e8bce045c9c8 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query42.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query42.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_42 -- +-- !ckbench_shape_42 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query43.out b/regression-test/data/nereids_clickbench_shape_p0/query43.out index fda2394495dcf1..80e197103fc1fb 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query43.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query43.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_43 -- +-- !ckbench_shape_43 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query5.out b/regression-test/data/nereids_clickbench_shape_p0/query5.out index b903ce81bfcc1b..94b8f2ad28f023 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query5.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query5.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_5 -- +-- !ckbench_shape_5 -- PhysicalResultSink --hashAgg[DISTINCT_GLOBAL] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query6.out b/regression-test/data/nereids_clickbench_shape_p0/query6.out index 302cdcb3147d8e..904169f68cb62a 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query6.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query6.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_6 -- +-- !ckbench_shape_6 -- PhysicalResultSink --hashAgg[GLOBAL] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query7.out b/regression-test/data/nereids_clickbench_shape_p0/query7.out index 9a184539f8f7f0..565f0c0f71985a 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query7.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query7.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_7 -- +-- !ckbench_shape_7 -- PhysicalResultSink --hashAgg[GLOBAL] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query8.out b/regression-test/data/nereids_clickbench_shape_p0/query8.out index fc35e28b0e09fb..5bebd9361a2ca6 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query8.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query8.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_8 -- +-- !ckbench_shape_8 -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/nereids_clickbench_shape_p0/query9.out b/regression-test/data/nereids_clickbench_shape_p0/query9.out index df1ff46add9b99..dcece9f0ce72d7 100644 --- a/regression-test/data/nereids_clickbench_shape_p0/query9.out +++ b/regression-test/data/nereids_clickbench_shape_p0/query9.out @@ -1,5 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !ds_shape_9 -- +-- !ckbench_shape_9 -- PhysicalResultSink --PhysicalTopN[MERGE_SORT] ----PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query1.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query1.groovy index dd600b39164257..d6043bb51bd555 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query1.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query1.groovy @@ -20,9 +20,10 @@ suite("query1") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT COUNT(*) FROM hits""" - qt_ds_shape_1 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT COUNT(*) FROM hits""" + qt_ckbench_shape_1 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query10.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query10.groovy index da844658243f91..b967deacf78e88 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query10.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query10.groovy @@ -21,9 +21,10 @@ suite("query10") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT RegionID, SUM(AdvEngineID), COUNT(*) AS c, AVG(ResolutionWidth), COUNT(DISTINCT UserID) FROM hits GROUP BY RegionID ORDER BY c DESC LIMIT 10""" - qt_ds_shape_10 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT RegionID, SUM(AdvEngineID), COUNT(*) AS c, AVG(ResolutionWidth), COUNT(DISTINCT UserID) FROM hits GROUP BY RegionID ORDER BY c DESC LIMIT 10""" + qt_ckbench_shape_10 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query11.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query11.groovy index 11210c7b7a9bb7..a3c5e7c89b9487 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query11.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query11.groovy @@ -22,9 +22,10 @@ suite("query11") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT MobilePhoneModel, COUNT(DISTINCT UserID) AS u FROM hits WHERE MobilePhoneModel <> '' GROUP BY MobilePhoneModel ORDER BY u DESC LIMIT 10""" - qt_ds_shape_11 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT MobilePhoneModel, COUNT(DISTINCT UserID) AS u FROM hits WHERE MobilePhoneModel <> '' GROUP BY MobilePhoneModel ORDER BY u DESC LIMIT 10""" + qt_ckbench_shape_11 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query12.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query12.groovy index 831a894975023b..6dd7cfc7066c5f 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query12.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query12.groovy @@ -22,9 +22,10 @@ suite("query12") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT MobilePhone, MobilePhoneModel, COUNT(DISTINCT UserID) AS u FROM hits WHERE MobilePhoneModel <> '' GROUP BY MobilePhone, MobilePhoneModel ORDER BY u DESC LIMIT 10""" - qt_ds_shape_12 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT MobilePhone, MobilePhoneModel, COUNT(DISTINCT UserID) AS u FROM hits WHERE MobilePhoneModel <> '' GROUP BY MobilePhone, MobilePhoneModel ORDER BY u DESC LIMIT 10""" + qt_ckbench_shape_12 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query13.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query13.groovy index 69980bd27c5c66..02f2d3c0bcb79c 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query13.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query13.groovy @@ -22,9 +22,10 @@ suite("query13") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT SearchPhrase, COUNT(*) AS c FROM hits WHERE SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10""" - qt_ds_shape_13 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT SearchPhrase, COUNT(*) AS c FROM hits WHERE SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10""" + qt_ckbench_shape_13 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query14.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query14.groovy index 70ac236e3367a1..96ccb1d87b1bf2 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query14.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query14.groovy @@ -22,9 +22,10 @@ suite("query14") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT SearchPhrase, COUNT(DISTINCT UserID) AS u FROM hits WHERE SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY u DESC LIMIT 10""" - qt_ds_shape_14 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT SearchPhrase, COUNT(DISTINCT UserID) AS u FROM hits WHERE SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY u DESC LIMIT 10""" + qt_ckbench_shape_14 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query15.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query15.groovy index 00962fc323fb44..bd5ec710823614 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query15.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query15.groovy @@ -22,9 +22,10 @@ suite("query15") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT SearchEngineID, SearchPhrase, COUNT(*) AS c FROM hits WHERE SearchPhrase <> '' GROUP BY SearchEngineID, SearchPhrase ORDER BY c DESC LIMIT 10""" - qt_ds_shape_15 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT SearchEngineID, SearchPhrase, COUNT(*) AS c FROM hits WHERE SearchPhrase <> '' GROUP BY SearchEngineID, SearchPhrase ORDER BY c DESC LIMIT 10""" + qt_ckbench_shape_15 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query16.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query16.groovy index 77d36d9ce467a4..e2d2d7c3a2ac50 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query16.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query16.groovy @@ -22,9 +22,10 @@ suite("query16") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT UserID, COUNT(*) FROM hits GROUP BY UserID ORDER BY COUNT(*) DESC LIMIT 10""" - qt_ds_shape_16 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT UserID, COUNT(*) FROM hits GROUP BY UserID ORDER BY COUNT(*) DESC LIMIT 10""" + qt_ckbench_shape_16 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query17.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query17.groovy index a7649669bdc999..5951de6864c4d9 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query17.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query17.groovy @@ -22,9 +22,10 @@ suite("query17") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT UserID, SearchPhrase, COUNT(*) FROM hits GROUP BY UserID, SearchPhrase ORDER BY COUNT(*) DESC LIMIT 10""" - qt_ds_shape_17 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT UserID, SearchPhrase, COUNT(*) FROM hits GROUP BY UserID, SearchPhrase ORDER BY COUNT(*) DESC LIMIT 10""" + qt_ckbench_shape_17 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query18.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query18.groovy index e7909a972e1e02..1bd7c55fd47a47 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query18.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query18.groovy @@ -22,9 +22,10 @@ suite("query18") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT UserID, SearchPhrase, COUNT(*) FROM hits GROUP BY UserID, SearchPhrase LIMIT 10""" - qt_ds_shape_18 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT UserID, SearchPhrase, COUNT(*) FROM hits GROUP BY UserID, SearchPhrase LIMIT 10""" + qt_ckbench_shape_18 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query19.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query19.groovy index 5f5e0460fee867..fe740c7a9390a6 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query19.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query19.groovy @@ -22,9 +22,10 @@ suite("query19") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT UserID, extract(minute FROM EventTime) AS m, SearchPhrase, COUNT(*) FROM hits GROUP BY UserID, m, SearchPhrase ORDER BY COUNT(*) DESC LIMIT 10""" - qt_ds_shape_19 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT UserID, extract(minute FROM EventTime) AS m, SearchPhrase, COUNT(*) FROM hits GROUP BY UserID, m, SearchPhrase ORDER BY COUNT(*) DESC LIMIT 10""" + qt_ckbench_shape_19 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query2.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query2.groovy index 8d0f3e40b8a498..3482d6d89b7d6e 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query2.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query2.groovy @@ -20,11 +20,12 @@ suite("query2") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """ SELECT COUNT(*) FROM hits WHERE AdvEngineID <> 0 """ - qt_ds_shape_2 """ + qt_ckbench_shape_2 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query20.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query20.groovy index 2efe03fa3e6264..78adc179a663dc 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query20.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query20.groovy @@ -22,9 +22,10 @@ suite("query20") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT UserID FROM hits WHERE UserID = 435090932899640449""" - qt_ds_shape_20 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT UserID FROM hits WHERE UserID = 435090932899640449""" + qt_ckbench_shape_20 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query21.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query21.groovy index ad0ca58b24d473..0a221c734fc91a 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query21.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query21.groovy @@ -22,9 +22,10 @@ suite("query21") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT COUNT(*) FROM hits WHERE URL LIKE '%google%'""" - qt_ds_shape_21 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT COUNT(*) FROM hits WHERE URL LIKE '%google%'""" + qt_ckbench_shape_21 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query22.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query22.groovy index 19145961d855bf..ab7fc01382b16a 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query22.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query22.groovy @@ -22,9 +22,10 @@ suite("query22") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT SearchPhrase, MIN(URL), COUNT(*) AS c FROM hits WHERE URL LIKE '%google%' AND SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10""" - qt_ds_shape_22 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT SearchPhrase, MIN(URL), COUNT(*) AS c FROM hits WHERE URL LIKE '%google%' AND SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10""" + qt_ckbench_shape_22 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query23.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query23.groovy index 90e1a00c38c495..54cdf1b1dacb37 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query23.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query23.groovy @@ -22,9 +22,10 @@ suite("query23") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT SearchPhrase, MIN(URL), MIN(Title), COUNT(*) AS c, COUNT(DISTINCT UserID) FROM hits WHERE Title LIKE '%Google%' AND URL NOT LIKE '%.google.%' AND SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10""" - qt_ds_shape_23 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT SearchPhrase, MIN(URL), MIN(Title), COUNT(*) AS c, COUNT(DISTINCT UserID) FROM hits WHERE Title LIKE '%Google%' AND URL NOT LIKE '%.google.%' AND SearchPhrase <> '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10""" + qt_ckbench_shape_23 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query24.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query24.groovy index 6dff783f3c9821..475d4c62527581 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query24.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query24.groovy @@ -22,9 +22,10 @@ suite("query24") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT * FROM hits WHERE URL LIKE '%google%' ORDER BY EventTime LIMIT 10""" - qt_ds_shape_24 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT * FROM hits WHERE URL LIKE '%google%' ORDER BY EventTime LIMIT 10""" + qt_ckbench_shape_24 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query25.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query25.groovy index dc1c4a1512f45b..24a9b77c77bdfc 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query25.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query25.groovy @@ -22,9 +22,10 @@ suite("query25") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT SearchPhrase FROM hits WHERE SearchPhrase <> '' ORDER BY EventTime LIMIT 10""" - qt_ds_shape_25 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT SearchPhrase FROM hits WHERE SearchPhrase <> '' ORDER BY EventTime LIMIT 10""" + qt_ckbench_shape_25 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query26.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query26.groovy index 8c711153e6b356..8fae8952feedd9 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query26.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query26.groovy @@ -22,9 +22,10 @@ suite("query26") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT SearchPhrase FROM hits WHERE SearchPhrase <> '' ORDER BY SearchPhrase LIMIT 10""" - qt_ds_shape_26 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT SearchPhrase FROM hits WHERE SearchPhrase <> '' ORDER BY SearchPhrase LIMIT 10""" + qt_ckbench_shape_26 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query27.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query27.groovy index 77585ae1359ebb..957862bde9fd64 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query27.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query27.groovy @@ -22,9 +22,10 @@ suite("query27") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT SearchPhrase FROM hits WHERE SearchPhrase <> '' ORDER BY EventTime, SearchPhrase LIMIT 10""" - qt_ds_shape_27 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT SearchPhrase FROM hits WHERE SearchPhrase <> '' ORDER BY EventTime, SearchPhrase LIMIT 10""" + qt_ckbench_shape_27 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query28.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query28.groovy index 3c3ac2f97bc213..e188cc05ec554d 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query28.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query28.groovy @@ -22,9 +22,10 @@ suite("query28") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT CounterID, AVG(length(URL)) AS l, COUNT(*) AS c FROM hits WHERE URL <> '' GROUP BY CounterID HAVING COUNT(*) > 100000 ORDER BY l DESC LIMIT 25""" - qt_ds_shape_28 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT CounterID, AVG(length(URL)) AS l, COUNT(*) AS c FROM hits WHERE URL <> '' GROUP BY CounterID HAVING COUNT(*) > 100000 ORDER BY l DESC LIMIT 25""" + qt_ckbench_shape_28 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query29.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query29.groovy index 5138e9188bde1e..dc3a9b8fcbf563 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query29.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query29.groovy @@ -22,9 +22,10 @@ suite("query29") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT REGEXP_REPLACE(Referer, '^https?://(?:www\\.)?([^/]+)/.*\$', '\\\\1') AS k, AVG(length(Referer)) AS l, COUNT(*) AS c, MIN(Referer) FROM hits WHERE Referer <> '' GROUP BY k HAVING COUNT(*) > 100000 ORDER BY l DESC LIMIT 25""" - qt_ds_shape_29 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT REGEXP_REPLACE(Referer, '^https?://(?:www\\.)?([^/]+)/.*\$', '\\\\1') AS k, AVG(length(Referer)) AS l, COUNT(*) AS c, MIN(Referer) FROM hits WHERE Referer <> '' GROUP BY k HAVING COUNT(*) > 100000 ORDER BY l DESC LIMIT 25""" + qt_ckbench_shape_29 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query3.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query3.groovy index d262a438f0414c..7939b7151e0d05 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query3.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query3.groovy @@ -20,9 +20,10 @@ suite("query3") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT SUM(AdvEngineID), COUNT(*), AVG(ResolutionWidth) FROM hits""" - qt_ds_shape_3 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT SUM(AdvEngineID), COUNT(*), AVG(ResolutionWidth) FROM hits""" + qt_ckbench_shape_3 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query30.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query30.groovy index 12119f8775f8f9..68fc34030e2af3 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query30.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query30.groovy @@ -22,9 +22,10 @@ suite("query30") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT SUM(ResolutionWidth), SUM(ResolutionWidth + 1), SUM(ResolutionWidth + 2), SUM(ResolutionWidth + 3), SUM(ResolutionWidth + 4), SUM(ResolutionWidth + 5), SUM(ResolutionWidth + 6), SUM(ResolutionWidth + 7), SUM(ResolutionWidth + 8), SUM(ResolutionWidth + 9), SUM(ResolutionWidth + 10), SUM(ResolutionWidth + 11), SUM(ResolutionWidth + 12), SUM(ResolutionWidth + 13), SUM(ResolutionWidth + 14), SUM(ResolutionWidth + 15), SUM(ResolutionWidth + 16), SUM(ResolutionWidth + 17), SUM(ResolutionWidth + 18), SUM(ResolutionWidth + 19), SUM(ResolutionWidth + 20), SUM(ResolutionWidth + 21), SUM(ResolutionWidth + 22), SUM(ResolutionWidth + 23), SUM(ResolutionWidth + 24), SUM(ResolutionWidth + 25), SUM(ResolutionWidth + 26), SUM(ResolutionWidth + 27), SUM(ResolutionWidth + 28), SUM(ResolutionWidth + 29), SUM(ResolutionWidth + 30), SUM(ResolutionWidth + 31), SUM(ResolutionWidth + 32), SUM(ResolutionWidth + 33), SUM(ResolutionWidth + 34), SUM(ResolutionWidth + 35), SUM(ResolutionWidth + 36), SUM(ResolutionWidth + 37), SUM(ResolutionWidth + 38), SUM(ResolutionWidth + 39), SUM(ResolutionWidth + 40), SUM(ResolutionWidth + 41), SUM(ResolutionWidth + 42), SUM(ResolutionWidth + 43), SUM(ResolutionWidth + 44), SUM(ResolutionWidth + 45), SUM(ResolutionWidth + 46), SUM(ResolutionWidth + 47), SUM(ResolutionWidth + 48), SUM(ResolutionWidth + 49), SUM(ResolutionWidth + 50), SUM(ResolutionWidth + 51), SUM(ResolutionWidth + 52), SUM(ResolutionWidth + 53), SUM(ResolutionWidth + 54), SUM(ResolutionWidth + 55), SUM(ResolutionWidth + 56), SUM(ResolutionWidth + 57), SUM(ResolutionWidth + 58), SUM(ResolutionWidth + 59), SUM(ResolutionWidth + 60), SUM(ResolutionWidth + 61), SUM(ResolutionWidth + 62), SUM(ResolutionWidth + 63), SUM(ResolutionWidth + 64), SUM(ResolutionWidth + 65), SUM(ResolutionWidth + 66), SUM(ResolutionWidth + 67), SUM(ResolutionWidth + 68), SUM(ResolutionWidth + 69), SUM(ResolutionWidth + 70), SUM(ResolutionWidth + 71), SUM(ResolutionWidth + 72), SUM(ResolutionWidth + 73), SUM(ResolutionWidth + 74), SUM(ResolutionWidth + 75), SUM(ResolutionWidth + 76), SUM(ResolutionWidth + 77), SUM(ResolutionWidth + 78), SUM(ResolutionWidth + 79), SUM(ResolutionWidth + 80), SUM(ResolutionWidth + 81), SUM(ResolutionWidth + 82), SUM(ResolutionWidth + 83), SUM(ResolutionWidth + 84), SUM(ResolutionWidth + 85), SUM(ResolutionWidth + 86), SUM(ResolutionWidth + 87), SUM(ResolutionWidth + 88), SUM(ResolutionWidth + 89) FROM hits""" - qt_ds_shape_30 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT SUM(ResolutionWidth), SUM(ResolutionWidth + 1), SUM(ResolutionWidth + 2), SUM(ResolutionWidth + 3), SUM(ResolutionWidth + 4), SUM(ResolutionWidth + 5), SUM(ResolutionWidth + 6), SUM(ResolutionWidth + 7), SUM(ResolutionWidth + 8), SUM(ResolutionWidth + 9), SUM(ResolutionWidth + 10), SUM(ResolutionWidth + 11), SUM(ResolutionWidth + 12), SUM(ResolutionWidth + 13), SUM(ResolutionWidth + 14), SUM(ResolutionWidth + 15), SUM(ResolutionWidth + 16), SUM(ResolutionWidth + 17), SUM(ResolutionWidth + 18), SUM(ResolutionWidth + 19), SUM(ResolutionWidth + 20), SUM(ResolutionWidth + 21), SUM(ResolutionWidth + 22), SUM(ResolutionWidth + 23), SUM(ResolutionWidth + 24), SUM(ResolutionWidth + 25), SUM(ResolutionWidth + 26), SUM(ResolutionWidth + 27), SUM(ResolutionWidth + 28), SUM(ResolutionWidth + 29), SUM(ResolutionWidth + 30), SUM(ResolutionWidth + 31), SUM(ResolutionWidth + 32), SUM(ResolutionWidth + 33), SUM(ResolutionWidth + 34), SUM(ResolutionWidth + 35), SUM(ResolutionWidth + 36), SUM(ResolutionWidth + 37), SUM(ResolutionWidth + 38), SUM(ResolutionWidth + 39), SUM(ResolutionWidth + 40), SUM(ResolutionWidth + 41), SUM(ResolutionWidth + 42), SUM(ResolutionWidth + 43), SUM(ResolutionWidth + 44), SUM(ResolutionWidth + 45), SUM(ResolutionWidth + 46), SUM(ResolutionWidth + 47), SUM(ResolutionWidth + 48), SUM(ResolutionWidth + 49), SUM(ResolutionWidth + 50), SUM(ResolutionWidth + 51), SUM(ResolutionWidth + 52), SUM(ResolutionWidth + 53), SUM(ResolutionWidth + 54), SUM(ResolutionWidth + 55), SUM(ResolutionWidth + 56), SUM(ResolutionWidth + 57), SUM(ResolutionWidth + 58), SUM(ResolutionWidth + 59), SUM(ResolutionWidth + 60), SUM(ResolutionWidth + 61), SUM(ResolutionWidth + 62), SUM(ResolutionWidth + 63), SUM(ResolutionWidth + 64), SUM(ResolutionWidth + 65), SUM(ResolutionWidth + 66), SUM(ResolutionWidth + 67), SUM(ResolutionWidth + 68), SUM(ResolutionWidth + 69), SUM(ResolutionWidth + 70), SUM(ResolutionWidth + 71), SUM(ResolutionWidth + 72), SUM(ResolutionWidth + 73), SUM(ResolutionWidth + 74), SUM(ResolutionWidth + 75), SUM(ResolutionWidth + 76), SUM(ResolutionWidth + 77), SUM(ResolutionWidth + 78), SUM(ResolutionWidth + 79), SUM(ResolutionWidth + 80), SUM(ResolutionWidth + 81), SUM(ResolutionWidth + 82), SUM(ResolutionWidth + 83), SUM(ResolutionWidth + 84), SUM(ResolutionWidth + 85), SUM(ResolutionWidth + 86), SUM(ResolutionWidth + 87), SUM(ResolutionWidth + 88), SUM(ResolutionWidth + 89) FROM hits""" + qt_ckbench_shape_30 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query31.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query31.groovy index 7e8645462141ba..68f162b5ff7ce4 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query31.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query31.groovy @@ -22,9 +22,10 @@ suite("query31") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT SearchEngineID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits WHERE SearchPhrase <> '' GROUP BY SearchEngineID, ClientIP ORDER BY c DESC LIMIT 10""" - qt_ds_shape_31 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT SearchEngineID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits WHERE SearchPhrase <> '' GROUP BY SearchEngineID, ClientIP ORDER BY c DESC LIMIT 10""" + qt_ckbench_shape_31 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query32.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query32.groovy index 399b7d218b5175..1ee97f415dbb33 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query32.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query32.groovy @@ -22,9 +22,10 @@ suite("query32") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT WatchID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits WHERE SearchPhrase <> '' GROUP BY WatchID, ClientIP ORDER BY c DESC LIMIT 10""" - qt_ds_shape_32 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT WatchID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits WHERE SearchPhrase <> '' GROUP BY WatchID, ClientIP ORDER BY c DESC LIMIT 10""" + qt_ckbench_shape_32 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query33.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query33.groovy index 9a7f8765e5d4d1..8a59a71a6119b6 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query33.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query33.groovy @@ -22,9 +22,10 @@ suite("query33") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT WatchID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits GROUP BY WatchID, ClientIP ORDER BY c DESC LIMIT 10""" - qt_ds_shape_33 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT WatchID, ClientIP, COUNT(*) AS c, SUM(IsRefresh), AVG(ResolutionWidth) FROM hits GROUP BY WatchID, ClientIP ORDER BY c DESC LIMIT 10""" + qt_ckbench_shape_33 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query34.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query34.groovy index ad97e9d90dc210..6a80ffc7a71a3d 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query34.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query34.groovy @@ -22,9 +22,10 @@ suite("query34") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT URL, COUNT(*) AS c FROM hits GROUP BY URL ORDER BY c DESC LIMIT 10""" - qt_ds_shape_34 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT URL, COUNT(*) AS c FROM hits GROUP BY URL ORDER BY c DESC LIMIT 10""" + qt_ckbench_shape_34 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query35.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query35.groovy index d530eec5af0168..dbdd745e44a02d 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query35.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query35.groovy @@ -22,9 +22,10 @@ suite("query35") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT 1, URL, COUNT(*) AS c FROM hits GROUP BY 1, URL ORDER BY c DESC LIMIT 10""" - qt_ds_shape_35 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT 1, URL, COUNT(*) AS c FROM hits GROUP BY 1, URL ORDER BY c DESC LIMIT 10""" + qt_ckbench_shape_35 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query36.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query36.groovy index 237d75e58a66dd..1aa7b9cf8c7513 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query36.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query36.groovy @@ -22,9 +22,10 @@ suite("query36") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT ClientIP, ClientIP - 1, ClientIP - 2, ClientIP - 3, COUNT(*) AS c FROM hits GROUP BY ClientIP, ClientIP - 1, ClientIP - 2, ClientIP - 3 ORDER BY c DESC LIMIT 10""" - qt_ds_shape_36 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT ClientIP, ClientIP - 1, ClientIP - 2, ClientIP - 3, COUNT(*) AS c FROM hits GROUP BY ClientIP, ClientIP - 1, ClientIP - 2, ClientIP - 3 ORDER BY c DESC LIMIT 10""" + qt_ckbench_shape_36 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query37.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query37.groovy index 0ec83cbdfe3e5a..794439aa06a2ed 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query37.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query37.groovy @@ -22,9 +22,10 @@ suite("query37") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT URL, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND DontCountHits = 0 AND IsRefresh = 0 AND URL <> '' GROUP BY URL ORDER BY PageViews DESC LIMIT 10""" - qt_ds_shape_37 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT URL, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND DontCountHits = 0 AND IsRefresh = 0 AND URL <> '' GROUP BY URL ORDER BY PageViews DESC LIMIT 10""" + qt_ckbench_shape_37 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query38.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query38.groovy index 5f8e0ada843fec..543871605a095a 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query38.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query38.groovy @@ -22,9 +22,10 @@ suite("query38") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT Title, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND DontCountHits = 0 AND IsRefresh = 0 AND Title <> '' GROUP BY Title ORDER BY PageViews DESC LIMIT 10""" - qt_ds_shape_38 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT Title, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND DontCountHits = 0 AND IsRefresh = 0 AND Title <> '' GROUP BY Title ORDER BY PageViews DESC LIMIT 10""" + qt_ckbench_shape_38 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query39.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query39.groovy index e1f73de71dc16d..dd5a48f45c5be6 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query39.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query39.groovy @@ -22,9 +22,10 @@ suite("query39") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT URL, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 AND IsLink <> 0 AND IsDownload = 0 GROUP BY URL ORDER BY PageViews DESC LIMIT 10 OFFSET 1000""" - qt_ds_shape_39 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT URL, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 AND IsLink <> 0 AND IsDownload = 0 GROUP BY URL ORDER BY PageViews DESC LIMIT 10 OFFSET 1000""" + qt_ckbench_shape_39 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query4.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query4.groovy index 0367c3f23dfbc3..a14ef08e312d06 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query4.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query4.groovy @@ -20,9 +20,10 @@ suite("query4") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT AVG(UserID) FROM hits""" - qt_ds_shape_4 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT AVG(UserID) FROM hits""" + qt_ckbench_shape_4 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query40.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query40.groovy index 03b71327920c8b..8d483a6210f73c 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query40.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query40.groovy @@ -22,9 +22,10 @@ suite("query40") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT TraficSourceID, SearchEngineID, AdvEngineID, CASE WHEN (SearchEngineID = 0 AND AdvEngineID = 0) THEN Referer ELSE '' END AS Src, URL AS Dst, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 GROUP BY TraficSourceID, SearchEngineID, AdvEngineID, Src, Dst ORDER BY PageViews DESC LIMIT 10 OFFSET 1000""" - qt_ds_shape_40 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT TraficSourceID, SearchEngineID, AdvEngineID, CASE WHEN (SearchEngineID = 0 AND AdvEngineID = 0) THEN Referer ELSE '' END AS Src, URL AS Dst, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 GROUP BY TraficSourceID, SearchEngineID, AdvEngineID, Src, Dst ORDER BY PageViews DESC LIMIT 10 OFFSET 1000""" + qt_ckbench_shape_40 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query41.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query41.groovy index f0435492024030..067bf6c1dc759b 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query41.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query41.groovy @@ -22,9 +22,10 @@ suite("query41") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT URLHash, EventDate, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 AND TraficSourceID IN (-1, 6) AND RefererHash = 3594120000172545465 GROUP BY URLHash, EventDate ORDER BY PageViews DESC LIMIT 10 OFFSET 100""" - qt_ds_shape_41 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT URLHash, EventDate, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 AND TraficSourceID IN (-1, 6) AND RefererHash = 3594120000172545465 GROUP BY URLHash, EventDate ORDER BY PageViews DESC LIMIT 10 OFFSET 100""" + qt_ckbench_shape_41 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query42.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query42.groovy index b8678eebdc25b0..660ea72ae8397f 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query42.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query42.groovy @@ -22,9 +22,10 @@ suite("query42") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT WindowClientWidth, WindowClientHeight, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 AND DontCountHits = 0 AND URLHash = 2868770270353813622 GROUP BY WindowClientWidth, WindowClientHeight ORDER BY PageViews DESC LIMIT 10 OFFSET 10000""" - qt_ds_shape_42 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT WindowClientWidth, WindowClientHeight, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-01' AND EventDate <= '2013-07-31' AND IsRefresh = 0 AND DontCountHits = 0 AND URLHash = 2868770270353813622 GROUP BY WindowClientWidth, WindowClientHeight ORDER BY PageViews DESC LIMIT 10 OFFSET 10000""" + qt_ckbench_shape_42 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query43.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query43.groovy index dfb9d303d88f63..382f254bd2e1f5 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query43.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query43.groovy @@ -21,9 +21,10 @@ suite("query43") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT DATE_FORMAT(EventTime, '%Y-%m-%d %H:%i:00') AS M, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-14' AND EventDate <= '2013-07-15' AND IsRefresh = 0 AND DontCountHits = 0 GROUP BY DATE_FORMAT(EventTime, '%Y-%m-%d %H:%i:00') ORDER BY DATE_FORMAT(EventTime, '%Y-%m-%d %H:%i:00') LIMIT 10 OFFSET 1000""" - qt_ds_shape_43 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT DATE_FORMAT(EventTime, '%Y-%m-%d %H:%i:00') AS M, COUNT(*) AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-14' AND EventDate <= '2013-07-15' AND IsRefresh = 0 AND DontCountHits = 0 GROUP BY DATE_FORMAT(EventTime, '%Y-%m-%d %H:%i:00') ORDER BY DATE_FORMAT(EventTime, '%Y-%m-%d %H:%i:00') LIMIT 10 OFFSET 1000""" + qt_ckbench_shape_43 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query5.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query5.groovy index e27ef96af842a5..16faeb1d0d678d 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query5.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query5.groovy @@ -20,9 +20,10 @@ suite("query5") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT COUNT(DISTINCT UserID) FROM hits""" - qt_ds_shape_5 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT COUNT(DISTINCT UserID) FROM hits""" + qt_ckbench_shape_5 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query6.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query6.groovy index 91c26622ffaf5a..1f2d89dd9234a9 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query6.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query6.groovy @@ -20,9 +20,10 @@ suite("query6") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT COUNT(DISTINCT SearchPhrase) FROM hits""" - qt_ds_shape_6 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT COUNT(DISTINCT SearchPhrase) FROM hits""" + qt_ckbench_shape_6 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query7.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query7.groovy index 4785e0f853c666..da50b6259deaa4 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query7.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query7.groovy @@ -21,9 +21,10 @@ suite("query7") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT MIN(EventDate), MAX(EventDate) FROM hits""" - qt_ds_shape_7 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT MIN(EventDate), MAX(EventDate) FROM hits""" + qt_ckbench_shape_7 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query8.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query8.groovy index 4675dcac2f8fda..1cf2626b45799f 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query8.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query8.groovy @@ -21,9 +21,10 @@ suite("query8") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT AdvEngineID, COUNT(*) FROM hits WHERE AdvEngineID <> 0 GROUP BY AdvEngineID ORDER BY COUNT(*) DESC""" - qt_ds_shape_8 """ + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT AdvEngineID, COUNT(*) FROM hits WHERE AdvEngineID <> 0 GROUP BY AdvEngineID ORDER BY COUNT(*) DESC""" + qt_ckbench_shape_8 """ explain shape plan - ${ds} + ${ckBench} """ } diff --git a/regression-test/suites/nereids_clickbench_shape_p0/query9.groovy b/regression-test/suites/nereids_clickbench_shape_p0/query9.groovy index 9b59357a21bf26..166b210a2f2e28 100644 --- a/regression-test/suites/nereids_clickbench_shape_p0/query9.groovy +++ b/regression-test/suites/nereids_clickbench_shape_p0/query9.groovy @@ -21,10 +21,11 @@ suite("query9") { sql 'set enable_nereids_planner=true' sql 'set enable_fallback_to_original_planner=false' - def ds = """SELECT RegionID, COUNT(DISTINCT UserID) AS u FROM hits GROUP BY RegionID ORDER BY u DESC LIMIT 10 + sql 'set topn_opt_limit_threshold = 1024' + def ckBench = """SELECT RegionID, COUNT(DISTINCT UserID) AS u FROM hits GROUP BY RegionID ORDER BY u DESC LIMIT 10 """ - qt_ds_shape_9 """ + qt_ckbench_shape_9 """ explain shape plan - ${ds} + ${ckBench} """ }