You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Hequn Cheng (JIRA)" <ji...@apache.org> on 2019/07/10 14:08:00 UTC

[jira] [Created] (FLINK-13196) Fix Ambiguous column name exception bug for Table API

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)