Skip to content

Commit

Permalink
modify regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
feiniaofeiafei committed May 9, 2024
1 parent 420dfc1 commit 4a4b6c0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 41 deletions.
35 changes: 0 additions & 35 deletions regression-test/data/performance_p0/redundant_conjuncts.out
Original file line number Diff line number Diff line change
@@ -1,36 +1 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !redundant_conjuncts --
PLAN FRAGMENT 0
OUTPUT EXPRS:
v1[#2]
PARTITION: UNPARTITIONED

HAS_COLO_PLAN_NODE: false

VRESULT SINK
MYSQL_PROTOCAL

1:VEXCHANGE
offset: 0
distribute expr lists:

PLAN FRAGMENT 1

PARTITION: HASH_PARTITIONED: k1[#0]

HAS_COLO_PLAN_NODE: false

STREAM DATA SINK
EXCHANGE ID: 01
UNPARTITIONED

0:VOlapScanNode(90)
TABLE: regression_test_performance_p0.redundant_conjuncts(redundant_conjuncts), PREAGGREGATION: ON
PREDICATES: (k1[#0] = 1)
partitions=0/1 (), tablets=0/0, tabletList=
cardinality=0, avgRowSize=0.0, numNodes=1
pushAggOp=NONE
final projections: v1[#1]
final project output tuple id: 1
planed with unknown column statistics

Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
suite("eliminate_outer_join") {
sql "SET enable_nereids_planner=true"
sql "SET enable_fallback_to_original_planner=false"
sql "set disable_nereids_rules='ELIMINATE_NOT_NULL'"
sql "set disable_join_reorder=true"
sql "set forbid_unknown_col_stats=false"
sql "set enable_bucket_shuffle_join=false"
sql "set runtime_filter_mode=OFF"
sql "set ignore_shape_nodes='PhysicalDistribute, PhysicalProject'"
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql "set disable_nereids_rules='PRUNE_EMPTY_PARTITION,ELIMINATE_NOT_NULL'"

String database = context.config.getDbNameByFile(context.file)
sql "drop database if exists ${database}"
Expand Down
13 changes: 9 additions & 4 deletions regression-test/suites/performance_p0/redundant_conjuncts.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
// under the License.

suite("redundant_conjuncts") {
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql """
DROP TABLE IF EXISTS redundant_conjuncts;
"""

sql """
CREATE TABLE IF NOT EXISTS `redundant_conjuncts` (
`k1` int(11) NULL COMMENT "",
Expand All @@ -30,8 +32,11 @@ suite("redundant_conjuncts") {
"replication_allocation" = "tag.location.default: 1"
);
"""

qt_redundant_conjuncts """
EXPLAIN SELECT /*+SET_VAR(REWRITE_OR_TO_IN_PREDICATE_THRESHOLD=2, parallel_fragment_exec_instance_num = 1, enable_shared_scan = false) */ v1 FROM redundant_conjuncts WHERE k1 = 1 AND k1 = 1;
"""

explain {
sql("""
SELECT /*+SET_VAR(REWRITE_OR_TO_IN_PREDICATE_THRESHOLD=2, parallel_fragment_exec_instance_num = 1, enable_shared_scan = false) */ v1 FROM redundant_conjuncts WHERE k1 = 1 AND k1 = 1;
""")
notContains "AND"
}
}

0 comments on commit 4a4b6c0

Please sign in to comment.