[ https://issues.apache.org/jira/browse/CALCITE-4774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17416976#comment-17416976 ]
duan xiong commented on CALCITE-4774: ------------------------------------- [~hyuan]. I am sorry for my mistake.+1 > When predicate conditions are equivalent, materialized view recognition fails. > ------------------------------------------------------------------------------ > > Key: CALCITE-4774 > URL: https://issues.apache.org/jira/browse/CALCITE-4774 > Project: Calcite > Issue Type: Improvement > Reporter: xzh_dz > Priority: Major > Labels: pull-request-available > Fix For: 1.28.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > > {code:java} > // code placeholder > org.apache.calcite.test.MaterializedViewSubstitutionVisitorTest > @Test void testRexCondition() { > final String mv = "" > + "select \"name\"\n" > + "from \"emps\"\n" > + "where \"deptno\" > 100 and \"deptno\" > 50\n" > + "group by \"name\""; > final String query = "" > + "select \"name\"\n" > + "from \"emps\"\n" > + "where \"deptno\" > 100" > + "group by \"name\""; > sql(mv, query).withChecker( > resultContains("" > + "EnumerableTableScan(table=[[hr, MV0]])")).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) -- This message was sent by Atlassian Jira (v8.3.4#803005)