xzh_dz created CALCITE-4780: ------------------------------- Summary: Unable to derive implicit predicate conditions, materialized view recognition failed Key: CALCITE-4780 URL: https://issues.apache.org/jira/browse/CALCITE-4780 Project: Calcite Issue Type: Improvement Reporter: xzh_dz
{code:java} // code placeholder org.apache.calcite.test.MaterializedViewSubstitutionVisitorTest @Test void testPredicate() { final String mv = "" + "select \"deptno\", \"empid\"\n" + "from \"emps\"\n" + "where \"deptno\" >= 1 and \"deptno\" <= 100"; final String query = "" + "select \"deptno\"\n" + "from \"emps\"\n" + "where \"deptno\" + 0 >= 1 and \"deptno\" + 0 <= 100"; sql(mv, query).ok(); } {code} 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) -- This message was sent by Atlassian Jira (v8.3.4#803005)