You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "xzh_dz (Jira)" <ji...@apache.org> on 2021/03/13 02:54:00 UTC

[jira] [Created] (CALCITE-4534) When TableScan has different order, materialized view recognition fails.

xzh_dz created CALCITE-4534:
-------------------------------

             Summary: When TableScan has different order, materialized view recognition fails.
                 Key: CALCITE-4534
                 URL: https://issues.apache.org/jira/browse/CALCITE-4534
             Project: Calcite
          Issue Type: Wish
            Reporter: xzh_dz


 In the project, when TableScan has different order in the Join operator, materialized view recognition fails.
{code:java}
// code placeholder
org.apache.calcite.test.MaterializedViewSubstitutionVisitorTest#testJoinMaterialization
@Test void testJoinMaterialization() {
  String q = "select \"empid\" from \"emps\"\n"
      + "join \"depts\" using (\"deptno\")";
  String m = "select \"empid\" from \"depts\"\n"
      + "join \"emps\" using (\"deptno\")";
  sql(m, q).ok();
}
{code}
{code:java}
// code placeholder
java.lang.AssertionError: 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:114) at org.apache.calcite.test.AbstractMaterializedViewTest.access$000(AbstractMaterializedViewTest.java:66) at org.apache.calcite.test.AbstractMaterializedViewTest$Sql.ok(AbstractMaterializedViewTest.java:228) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.apache.calcite.util.ImmutableBeans.lambda$makeDef$3(ImmutableBeans.java:299) at org.apache.calcite.util.ImmutableBeans$BeanImpl.invoke(ImmutableBeans.java:480) at com.sun.proxy.$Proxy13.ok(Unknown Source)
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)