[
https://issues.apache.org/jira/browse/CALCITE-4774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17416958#comment-17416958
]
duan xiong edited comment on CALCITE-4774 at 9/17/21, 10:50 PM:
----------------------------------------------------------------
[~hyuan] As a comment on _PR_ before. This PR includes two tests are one and
the same. Please check that. Thanks.
was (Author: nobigo):
[~hyuan] As a comment on _PR_ before_,_ This PR includes two tests are one and
the same. Please check that. Thanks.
> 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)