You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dian Fu (Jira)" <ji...@apache.org> on 2020/12/28 12:34:00 UTC

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

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

Dian Fu updated FLINK-13196:
----------------------------
        Parent: FLINK-20787
    Issue Type: Sub-task  (was: Bug)

> 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
>          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)