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 2020/11/03 08:40:00 UTC
[jira] [Updated] (CALCITE-4374) Support materialized view
recognition when query distinct aggregate on target GROUP BY column
[ https://issues.apache.org/jira/browse/CALCITE-4374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wang Yanlin updated CALCITE-4374:
---------------------------------
Description:
When query distinct aggregate on the column, which is in the group by list of target.
Ma
{noformat}
@Test void testQueryDistinctColumnInTargetGroupByList() {
final String mv = ""
+ "select \"name\", \"deptno\" as cnt "
+ "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}
> 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
>
> When query distinct aggregate on the column, which is in the group by list of target.
> Ma
> {noformat}
> @Test void testQueryDistinctColumnInTargetGroupByList() {
> final String mv = ""
> + "select \"name\", \"deptno\" as cnt "
> + "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)