You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Wang Yanlin (Jira)" <ji...@apache.org> on 2021/09/28 02:08:00 UTC

[jira] [Resolved] (CALCITE-4779) GroupByList contains constant literal, materialized view recognition failed

     [ https://issues.apache.org/jira/browse/CALCITE-4779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wang Yanlin resolved CALCITE-4779.
----------------------------------
    Resolution: Fixed

Fixed in [https://github.com/apache/calcite/commit/219e41eab20533f02d41238d1ebc617cc813b9a2,] thx [~xzh_dz]

> GroupByList contains constant literal, materialized view recognition failed
> ---------------------------------------------------------------------------
>
>                 Key: CALCITE-4779
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4779
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: xzh_dz
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2021-09-19-06-41-52-352.png
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> {code:java}
> // 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();
> }
> {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)