Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-20787 Improve the Table API to make it usable
  3. FLINK-13196

Fix Ambiguous column name exception bug for Table API

    XMLWordPrintableJSON

    Details

      Description

      The following query should be valid, however, ambiguous column name exception is thrown.

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

      We should add some alias logic in AggregationAndPropertiesReplacer if the name has ever been used.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hequn8128 Hequn Cheng
                Reporter:
                hequn8128 Hequn Cheng
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m