[
https://issues.apache.org/jira/browse/FLINK-22853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17356104#comment-17356104
]
JinxinTang commented on FLINK-22853:
------------------------------------
seems can not reproduce ~
{code:java}
// code placeholder
EnvironmentSettings settings =
EnvironmentSettings.newInstance().useBlinkPlanner().inBatchMode().build();
TableEnvironment tableEnvironment = TableEnvironment.create(settings);
Table input =
tableEnvironment.fromValues(DataTypes.ROW(DataTypes.FIELD("id",
DataTypes.STRING()),
DataTypes.FIELD("offset", DataTypes.INT())),
Row.of("1", 1), Row.of("1", 3), Row.of("1", 2));
tableEnvironment.createTemporaryView("table1", input);
tableEnvironment.executeSql("select id,sum(`offset`) from table1 group by id"
).print();
{code}
> FLinkSql聚合函数max/min/sum返回结果重复
> -----------------------------
>
> Key: FLINK-22853
> URL: https://issues.apache.org/jira/browse/FLINK-22853
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Affects Versions: 1.12.1
> Reporter: Raypon Wang
> Priority: Blocker
>
> mysql数据如下:
> id offset
> 1 1
> 1 3
> 1 2
> flinksql code:
> val settings =
> EnvironmentSettings.newInstance().useBlinkPlanner().inBatchMode().build()
> val tableEnvironment = TableEnvironment.create(settings)
> tableEnvironment.executeSql("select id,max(`offset`) from table group by id"
> ).print()
>
> result:
> +----------------------+-------------+
> | id | EXPR$1 |
> +----------------------+-------------+
> | 1 | 1 |
> | 1 | 3 |
> | 1 | 2 |
> +----------------------+-------------+
> max/min/sum都有这个问题;
> 但是 avg/count/last_value/first_value 没有这个问题
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)