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

Add IntersectToIntersectUnifyRule in SubstitutionVisitor

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.22.0
    • None

    Description

      when i run those code as below, i got some error messages.

      //MaterializationTest
      @Test public void testJoinToJoin0() {
          String mv = ""
              + "select \"deptno\" from\n"
              + "\"emps\" intersect select \"deptno\"  from \"depts\"";
          String query = ""
              + "select \"deptno\" from\n"
              + "\"depts\" intersect select \"deptno\" from \"emps\"";
          checkMaterialize(mv, query, true);
        }
      

      java.lang.AssertionError:
      Expected: a string containing "EnumerableTableScan(table=[[hr, m0]])"
      but: was "PLAN=EnumerableCalc(expr#0..1=[

      {inputs}

      ], expr#2=[2:BIGINT], expr#3=[=($t1, $t2)], deptno=[$t0], $condition=[$t3])\n EnumerableAggregate(group=[

      {0}], agg#0=[COUNT()])\n EnumerableUnion(all=[true])\n EnumerableAggregate(group=[{0}

      ], agg#0=[COUNT()])\n EnumerableTableScan(table=[[hr, depts]])\n EnumerableAggregate(group=[

      {1}

      ], agg#0=[COUNT()])\n EnumerableTableScan(table=[[hr, emps]])\n\n"
      <Click to see difference>

      at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
      at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
      at org.apache.calcite.test.CalciteAssert.lambda$checkResultContains$7(CalciteAssert.java:429)
      at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:544)
      at org.apache.calcite.test.CalciteAssert$AssertQuery.lambda$returns$1(CalciteAssert.java:1514)
      at org.apache.calcite.test.CalciteAssert$AssertQuery.withConnection(CalciteAssert.java:1446)
      at org.apache.calcite.test.CalciteAssert$AssertQuery.returns(CalciteAssert.java:1512)
      at org.apache.calcite.test.CalciteAssert$AssertQuery.explainMatches(CalciteAssert.java:1609)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              xzh_dz xzh_dz
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m