flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Swapnil Sarda (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-3723) Aggregate Functions and scalar expressions shouldn't be mixed in select
Date Sun, 02 Apr 2017 08:49:41 GMT

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

Swapnil Sarda commented on FLINK-3723:
--------------------------------------

Hi, I am new to flink. Is this issue still open (as it was to be done by 1.1.0). If so can
someone point me to the files involved in implementing this?
Thanks.

> Aggregate Functions and scalar expressions shouldn't be mixed in select
> -----------------------------------------------------------------------
>
>                 Key: FLINK-3723
>                 URL: https://issues.apache.org/jira/browse/FLINK-3723
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>    Affects Versions: 1.0.1
>            Reporter: Yijie Shen
>            Priority: Critical
>
> When we type {code}select deptno, name, max(age) from dept group by deptno;{code} in
calcite or Oracle, it will complain {code}Expression 'NAME' is not being grouped{code} or
{code}Column 'dept.name' is invalid in the select list because it is not contained in either
an aggregate function or the GROUP BY clause.{code} because of the nondeterministic result.
> Therefore, I suggest to separate the current functionality of `select` into two api,
the new `select` only handle scalar expressions, and an `agg` accept Aggregates.
> {code}
> def select(exprs: Expression*)
> def agg(aggs: Aggregation*)
> ....
> tbl.groupBy('deptno)
>    .agg('age.max, 'age.min)
> {code}



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

Mime
View raw message