[
https://issues.apache.org/jira/browse/CALCITE-4374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17230322#comment-17230322
]
Wang Yanlin commented on CALCITE-4374:
--------------------------------------
Fixed in Fixed in
https://github.com/apache/calcite/commit/1e6b7425ec20e2bddc6331a21016475a43f9d995,
thx [~xzh_dz]
> Support materialized view recognition when query distinct aggregate on target
> GROUP BY column
> ---------------------------------------------------------------------------------------------
>
> Key: CALCITE-4374
> URL: https://issues.apache.org/jira/browse/CALCITE-4374
> Project: Calcite
> Issue Type: Improvement
> Reporter: Wang Yanlin
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> When query distinct aggregate on the column, which is in the group by list of
> target.
> Materialized view recognition should success.
> See this case.
> {noformat}
> @Test void testQueryDistinctColumnInTargetGroupByList() {
> final String mv = ""
> + "select \"name\", \"deptno\" "
> + "from \"emps\" group by \"name\", \"deptno\"";
> final String query = ""
> + "select \"name\", count(distinct \"deptno\")\n"
> + "from \"emps\" group by \"name\"";
> sql(mv, query).ok();
> }
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)