You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Kurt Young (Jira)" <ji...@apache.org> on 2020/01/09 09:09:00 UTC

[jira] [Closed] (FLINK-15466) `FlinkAggregateExpandDistinctAggregatesRule` generates wrong plan for cases that have distinct aggs with filter.

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

Kurt Young closed FLINK-15466.
------------------------------
    Resolution: Fixed

master: 6f2e9abffb0b1ef68e4f2cf058a24524b61e88a1

1.10.0: ce7968ecafcde69596897a2243235161cd347b13

> `FlinkAggregateExpandDistinctAggregatesRule` generates wrong plan for cases that have distinct aggs with filter.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-15466
>                 URL: https://issues.apache.org/jira/browse/FLINK-15466
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.8.3, 1.9.1
>            Reporter: Shuo Cheng
>            Assignee: Shuo Cheng
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.10.0
>
>         Attachments: image-2020-01-03-14-24-35-943.png
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> For the sql in batch mode,
>  
> {code:java}
> SELECT 
>    a, COUNT(a), SUM(DISTINCT b) FILTER (WHERE a > 0)
> FROM MyTable 
> GROUP BY a{code}
>  
> plan generated after logical stage is as following, which is not correct. The `Filter $4` should be `$f2 *and* $g_0`.
> !image-2020-01-03-14-24-35-943.png!



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