flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aljoscha Krettek (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLINK-2115) TableAPI throws ExpressionException for "Dangling GroupBy operation"
Date Wed, 02 Dec 2015 11:23:10 GMT

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

Aljoscha Krettek resolved FLINK-2115.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.0.0

Fixed in https://github.com/apache/flink/commit/f8b456b582912f214b606a86664188ae4abf07a3

> 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
>             Fix For: 1.0.0
>
>
> 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)

Mime
View raw message