Skip to content

Commit

Permalink
[fix](test) ckbench shape unstable since topn_opt_limit_threshold in …
Browse files Browse the repository at this point in the history
…fuzzy list (apache#32256)

fix ckbench shape unstable since topn_opt_limit_threshold in fuzzy list
  • Loading branch information
morrySnow authored Mar 14, 2024
1 parent 1a9db84 commit a18845b
Show file tree
Hide file tree
Showing 86 changed files with 215 additions and 172 deletions.
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
"""
}
Original file line number Diff line number Diff line change
Expand Up @@ -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}
"""
}
Original file line number Diff line number Diff line change
Expand Up @@ -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}
"""
}
Original file line number Diff line number Diff line change
Expand Up @@ -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}
"""
}
Original file line number Diff line number Diff line change
Expand Up @@ -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}
"""
}
Original file line number Diff line number Diff line change
Expand Up @@ -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}
"""
}
Original file line number Diff line number Diff line change
Expand Up @@ -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}
"""
}
Loading

0 comments on commit a18845b

Please sign in to comment.