You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Xurenhe (Jira)" <ji...@apache.org> on 2021/10/18 03:18:00 UTC

[jira] [Updated] (CALCITE-4857) Materialization-Failed, query could be grouping mv's agg-call, when executing mv-match.

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

Xurenhe updated CALCITE-4857:
-----------------------------
    Attachment: image-2021-10-18-11-17-36-672.png

> Materialization-Failed, query could be grouping mv's agg-call, when executing mv-match.
> ---------------------------------------------------------------------------------------
>
>                 Key: CALCITE-4857
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4857
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Xurenhe
>            Priority: Major
>
> Here, query could be rewritten by mv, but it's failed now.
> {code:java}
> -- mv: 
> select deptno, salary, min(commission) as commission_min 
> from emps 
> group by deptno, salary
> -- query: 
> select deptno, salary, max(salary), min(commission) 
> from emps 
> group by deptno, salary
> -- after mv match
> select deptno, salary, max(salary), commission_min
> from mv
> group by deptno, salary, commission_min
> {code}
>  
> !image-2021-10-18-11-16-31-023.png!
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)