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

ASF GitHub Bot commented on FLINK-2115:
---------------------------------------

GitHub user ChengXiangLi opened a pull request:

    https://github.com/apache/flink/pull/1377

    [FLINK-2115] [Table API] support no aggregation after groupBy.

    `JavaBatchTranslator` does not support no aggregation `select` after 
`groupBy` previously, add the logic in this PR.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ChengXiangLi/flink flink-2115

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1377.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1377
    
----
commit 461f60ceb5e07ca192451c07813a405b83470acc
Author: chengxiang li <[email protected]>
Date:   2015-11-18T11:02:11Z

    [FLINK-2115] [Table API] support no aggregation after groupBy.

----


> TableAPI throws ExpressionException for "Dangling GroupBy operation"
> --------------------------------------------------------------------
>
>                 Key: FLINK-2115
>                 URL: https://issues.apache.org/jira/browse/FLINK-2115
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API
>    Affects Versions: 0.9
>            Reporter: Fabian Hueske
>            Assignee: Chengxiang Li
>
> The following program below throws an ExpressionException due to a "Dangling 
> GroupBy operation".
> However, I think the program is semantically correct and should execute.
> {code}
> public static void main(String[] args) throws Exception {
>   ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
>   DataSet<Integer> data = env.fromElements(1,2,2,3,3,3,4,4,4,4);
>   DataSet<Tuple2<Integer, Integer>> tuples = data
>       .map(new MapFunction<Integer, Tuple2<Integer, Integer>>() {
>         @Override
>         public Tuple2<Integer, Integer> map(Integer i) throws Exception {
>           return new Tuple2<Integer, Integer>(i, i*2);
>         }
>       });
>   TableEnvironment tEnv = new TableEnvironment();
>   Table t = tEnv.toTable(tuples).as("i, i2")
>       .groupBy("i, i2").select("i, i2")
>       .groupBy("i").select("i, i.count as cnt");
>   tEnv.toSet(t, Row.class).print();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to