[ 
https://issues.apache.org/jira/browse/FLINK-6250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15967477#comment-15967477
 ] 

Stefano Bortoli commented on FLINK-6250:
----------------------------------------

Ok, as a workaround for the missing distinct aggregation, I have implemented a 
new {{SqlFunction}} called {{DIST(<NUMERIC>)}} that is intercepted in the 
{{DataStreamOverAggregate}} and used to create the {{distinctFlag}} for the 
aggregators. That part will be removed as soon as calcite supports DISTINCT 
aggregations. I think that eventually this task should be subject of a JIRA 
issue by itself.

> Distinct procTime with Rows boundaries
> --------------------------------------
>
>                 Key: FLINK-6250
>                 URL: https://issues.apache.org/jira/browse/FLINK-6250
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>            Reporter: radu
>            Assignee: Stefano Bortoli
>
> Support proctime with rows boundaries
> Q1.1. `SELECT SUM( DISTINCT  b) OVER (ORDER BY procTime() ROWS BETWEEN 2 
> PRECEDING AND CURRENT ROW) FROM stream1`
> Q1.1. `SELECT COUNT(b), SUM( DISTINCT  b) OVER (ORDER BY procTime() ROWS 
> BETWEEN 2 PRECEDING AND CURRENT ROW) FROM stream1`



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to