[ https://issues.apache.org/jira/browse/CALCITE-2964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16806398#comment-16806398 ]
Haisheng Yuan commented on CALCITE-2964: ---------------------------------------- Looks like we just need to add ValuesReduceRule.FILTER_INSTANCE to testEmptyFilterProjectUnion. So this is not a bug, I will close this issue. Feel free to reopen it if you don't think so. > testEmptyFilterProjectUnion fails when copyPorject is disabled in > FilterProjectTransposeRule > -------------------------------------------------------------------------------------------- > > Key: CALCITE-2964 > URL: https://issues.apache.org/jira/browse/CALCITE-2964 > Project: Calcite > Issue Type: Bug > Components: core > Reporter: Haisheng Yuan > Priority: Major > > Changing > {code:java} > public static final FilterProjectTransposeRule INSTANCE = > new FilterProjectTransposeRule(Filter.class, Project.class, true, true, > RelFactories.LOGICAL_BUILDER); > {code} > to > {code:java} > public static final FilterProjectTransposeRule INSTANCE = > new FilterProjectTransposeRule(Filter.class, Project.class, true, false, > RelFactories.LOGICAL_BUILDER); > {code} > will cause testEmptyFilterProjectUnion plan diff: > {code:java} > LogicalProject(X=[$0], Y=[$1]) > LogicalUnion(all=[true]) > LogicalFilter(condition=[>(+($0, $1), 30)]) > LogicalValues(tuples=[[{ 10, 1 }, { 30, 3 }]]) > LogicalFilter(condition=[>(+($0, $1), 30)]) > LogicalValues(tuples=[[{ 20, 2 }]]) > {code} > The expected plan is: > {code:java} > LogicalProject(X=[$0], Y=[$1]) > LogicalValues(tuples=[[{ 30, 3 }]]) > {code} > I am assuming it will generate the same plan no matter copyFilter/copyProject > is on or off. Is this wrong assumption? -- This message was sent by Atlassian JIRA (v7.6.3#76005)