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

GroupByList contains constant literal, materialized view recognition failed

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.28.0
    • None

    Description

      // code placeholder
      org.apache.calcite.test.MaterializedViewSubstitutionVisitorTest
      @Test void testCountDistinct() {
        final String mv = ""
            + "select \"deptno\", \"empid\"\n"
            + "from \"emps\"\n"
            + "group by \"deptno\", \"empid\"";
        final String query = ""
            + "select 1, \"deptno\"\n"
            + "from \"emps\"\n"
            + "group by 1, \"deptno\"";
        sql(mv, query).ok();
      }
      

      Materialized view failed to be matched by optimized results:Materialized view failed to be matched by optimized results: java.lang.AssertionError: Materialized view failed to be matched by optimized results: at org.apache.calcite.test.AbstractMaterializedViewTest.checkMaterialize(AbstractMaterializedViewTest.java:116) at org.apache.calcite.test.AbstractMaterializedViewTest.access$000(AbstractMaterializedViewTest.java:67) at org.apache.calcite.test.AbstractMaterializedViewTest$Sql.ok(AbstractMaterializedViewTest.java:229) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              xzh_dz xzh_dz
              Votes:
              0 Vote for this issue
              Watchers:
              5 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 - 1h 20m
                  1h 20m