Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2964

testEmptyFilterProjectUnion fails when copyPorject is disabled in FilterProjectTransposeRule

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • None
    • None
    • core
    • None

    Description

      Changing

      public static final FilterProjectTransposeRule INSTANCE =
            new FilterProjectTransposeRule(Filter.class, Project.class, true, true,
                RelFactories.LOGICAL_BUILDER);
      

      to

      public static final FilterProjectTransposeRule INSTANCE =
            new FilterProjectTransposeRule(Filter.class, Project.class, true, false,
                RelFactories.LOGICAL_BUILDER);
      

      will cause testEmptyFilterProjectUnion plan diff:

      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 }]])
      

      The expected plan is:

      LogicalProject(X=[$0], Y=[$1])
        LogicalValues(tuples=[[{ 30, 3 }]])
      

      I am assuming it will generate the same plan no matter copyFilter/copyProject is on or off. Is this wrong assumption?

      Attachments

        Activity

          People

            Unassigned Unassigned
            hyuan Haisheng Yuan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: