Haisheng Yuan created CALCITE-2964:
--------------------------------------

             Summary: 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


Changing

{code:java}
public static final FilterProjectTransposeRule INSTANCE =
      new FilterProjectTransposeRule(Filter.class, Project.class, true, false,
          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)

Reply via email to