[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
This commit is contained in:
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
@ -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}
|
||||
"""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user