[
https://issues.apache.org/jira/browse/FLINK-13196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17323225#comment-17323225
]
Flink Jira Bot commented on FLINK-13196:
----------------------------------------
This issue is assigned but has not received an update in 7 days so it has been
labeled "stale-assigned". If you are still working on the issue, please give an
update and remove the label. If you are no longer working on the issue, please
unassign so someone else may work on it. In 7 days the issue will be
automatically unassigned.
> Fix Ambiguous column name exception bug for Table API
> -----------------------------------------------------
>
> Key: FLINK-13196
> URL: https://issues.apache.org/jira/browse/FLINK-13196
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / API
> Affects Versions: 1.9.0
> Reporter: Hequn Cheng
> Assignee: Hequn Cheng
> Priority: Major
> Labels: pull-request-available, stale-assigned
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The following query should be valid, however, ambiguous column name exception
> is thrown.
> {code:java}
> val util = streamTestUtil()
> val table = util.addTable[(Long, Int, String)]('a, 'b, 'c)
> val resultTable = table
> .groupBy('b)
> .select('b, 'a.sum, 'a.sum, 'a.sum)
> {code}
> {code:java}
> org.apache.flink.table.api.ValidationException: Ambiguous column name: EXPR$0
> at
> org.apache.flink.table.operations.utils.factories.ProjectionOperationFactory.lambda$validateAndGetUniqueNames$4(ProjectionOperationFactory.java:103)
> {code}
> We should add some alias logic in {{AggregationAndPropertiesReplacer}} if the
> name has ever been used.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)