Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-20787 Improve the Table API to solve user friction
  3. FLINK-20794

Support to select distinct columns in the Table API

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • Table SQL / API
    • None

    Description

      Currently, there is no corresponding functionality in Table API for the following SQL:

      SELECT DISTINCT users FROM Orders
      

      For example, for the following job:

      table.select("distinct a")
      

      It will thrown the following exception:

      org.apache.flink.table.api.ExpressionParserException: Could not parse expression at column 10: ',' expected but 'a' foundorg.apache.flink.table.api.ExpressionParserException: Could not parse expression at column 10: ',' expected but 'a' founddistinct a         ^
       at org.apache.flink.table.expressions.PlannerExpressionParserImpl$.throwError(PlannerExpressionParserImpl.scala:726) at org.apache.flink.table.expressions.PlannerExpressionParserImpl$.parseExpressionList(PlannerExpressionParserImpl.scala:710) at org.apache.flink.table.expressions.PlannerExpressionParserImpl.parseExpressionList(PlannerExpressionParserImpl.scala:47) at org.apache.flink.table.expressions.ExpressionParser.parseExpressionList(ExpressionParser.java:40) at org.apache.flink.table.api.internal.TableImpl.select(TableImpl.java:121)

      Attachments

        1. screenshot-1.png
          20 kB
          Vishaal Selvaraj

        Activity

          People

            supercmmetry Vishaal Selvaraj
            dian.fu Dian Fu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: