From bb457d7b0d174147b174ae0bca4ffff4fa0151d0 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 140c946b58..f98c53e3d5 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 3987a5ecb5..c784056436 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 c3a969eb06..4b5e4486d3 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 61f1f60130..10928363a8 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 6f78dbb9df..ce6675dc3b 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 aa271b6d27..35eedce41b 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 114c108ba7..bf7f267f0e 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 8f77e55d7a..a229f5310d 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 9d58bcabe0..78635481d0 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 aeb98a7711..0a03abdf84 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 5e4556e203..7540225b39 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 5106d00298..4f4565a083 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 74a11d0639..51f1da68b4 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 6695e7a4f0..104d1b4710 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 fec375258d..d5274c3548 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 ecb08ba607..76a91b3ad4 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 9cacd85803..fd0a2f5b67 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 16acace706..271149db67 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 07b70c3395..7317f810a3 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 81fee2d823..1dbae1e0dc 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 338b96ea2a..e5cb28eab7 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 beb53fbc0a..01e642b5b4 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 2a05305518..d4fb562b4f 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 256e01bf4a..8a3f753f3d 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 4588d54889..a662fac4ef 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 bc994d43d4..29828472cc 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 df1e6047b4..f47fe46b46 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 c0634a1098..c2b2ed43e7 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 90cb80f6ce..7fb8594fbe 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 82bf9c416f..5000e553f8 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 c5b0ca06c8..757b4f64df 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 7f3cf967a5..37d0392a7b 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 cf5f1f1f0a..89222c0f0d 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 5722d13a70..966b6cb7ec 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 1acdb05af8..1218097c17 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 210ae16247..8a7019e596 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 adabcb7498..b4e8bce045 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 fda2394495..80e197103f 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 b903ce81bf..94b8f2ad28 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 302cdcb314..904169f68c 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 9a184539f8..565f0c0f71 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 fc35e28b0e..5bebd9361a 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 df1ff46add..dcece9f0ce 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 dd600b3916..d6043bb51b 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 da84465824..b967deacf7 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 11210c7b7a..a3c5e7c89b 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 831a894975..6dd7cfc706 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 69980bd27c..02f2d3c0bc 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 70ac236e33..96ccb1d87b 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 00962fc323..bd5ec71082 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 77d36d9ce4..e2d2d7c3a2 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 a7649669bd..5951de6864 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 e7909a972e..1bd7c55fd4 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 5f5e0460fe..fe740c7a93 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 8d0f3e40b8..3482d6d89b 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 2efe03fa3e..78adc179a6 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 ad0ca58b24..0a221c734f 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 19145961d8..ab7fc01382 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 90e1a00c38..54cdf1b1da 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 6dff783f3c..475d4c6252 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 dc1c4a1512..24a9b77c77 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 8c711153e6..8fae8952fe 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 77585ae135..957862bde9 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 3c3ac2f97b..e188cc05ec 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 5138e9188b..dc3a9b8fcb 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 d262a438f0..7939b7151e 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 12119f8775..68fc34030e 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 7e86454621..68f162b5ff 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 399b7d218b..1ee97f415d 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 9a7f8765e5..8a59a71a61 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 ad97e9d90d..6a80ffc7a7 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 d530eec5af..dbdd745e44 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 237d75e58a..1aa7b9cf8c 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 0ec83cbdfe..794439aa06 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 5f8e0ada84..543871605a 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 e1f73de71d..dd5a48f45c 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 0367c3f23d..a14ef08e31 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 03b7132792..8d483a6210 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 f043549202..067bf6c1dc 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 b8678eebdc..660ea72ae8 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 dfb9d303d8..382f254bd2 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 e27ef96af8..16faeb1d0d 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 91c26622ff..1f2d89dd92 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 4785e0f853..da50b6259d 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 4675dcac2f..1cf2626b45 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 9b59357a21..166b210a2f 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} """ }