Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Sep 21, 2023
1 parent bd9b058 commit 87149f0
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class QueryPlanTest extends TestWithFeService {
protected void runBeforeAll() throws Exception {
// disable bucket shuffle join
Deencapsulation.setField(connectContext.getSessionVariable(), "enableBucketShuffleJoin", false);

connectContext.getSessionVariable().setEnableRuntimeFilterPrune(false);
// create database
createDatabase("test");
connectContext.getSessionVariable().setEnableNereidsPlanner(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
// under the License.

suite("test_runtimefilter_with_window") {
sql """ set enable_nereids_planner=false"""
sql """ set enable_nereids_planner=true"""
sql """ set disable_join_reorder=true"""
sql """ DROP TABLE IF EXISTS `test_runtimefilter_with_window_table1` """
sql """ DROP TABLE IF EXISTS `test_runtimefilter_with_window_table2` """
sql """
Expand Down Expand Up @@ -82,9 +83,42 @@ suite("test_runtimefilter_with_window") {
on a.channel_param = b.param; """)
contains "runtime filters"
}

sql """ DROP TABLE IF EXISTS `test_runtimefilter_with_window_table1` """
sql """ DROP TABLE IF EXISTS `test_runtimefilter_with_window_table2` """

sql """ set enable_nereids_planner=false"""
sql """ set disable_join_reorder=true"""
sql """ set enable_runtime_filter_prune=false"""
log.info("======origin planner1=================")
explain {
sql("""select a.phone
,a.channel_param
,a.createtime
,rn
,if(rn = 1,1,0) as liuzi_status
from (
select a.phone,a.channel_param,a.createtime
,row_number() over(partition by phone order by createtime asc) as rn
from test_runtimefilter_with_window_table2 a
) a join (
select param
from test_runtimefilter_with_window_table1
) b
on a.channel_param = b.param; """)
notContains "runtime filters"
}
log.info("======origin planner2=================")
explain {
sql("""select a.phone
,a.channel_param
,a.createtime
from (
select a.phone,a.channel_param,a.createtime
from test_runtimefilter_with_window_table2 a
) a join (
select param
from test_runtimefilter_with_window_table1
) b
on a.channel_param = b.param; """)
contains "runtime filters"
}
}

0 comments on commit 87149f0

Please sign in to comment.