Hequn Cheng created FLINK-13196:
-----------------------------------
Summary: 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: Bug
Components: Table SQL / API
Affects Versions: 1.9.0
Reporter: Hequn Cheng
Assignee: Hequn Cheng
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
(v7.6.3#76005)