Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-31865

Flink hive parser support order by non select column

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Connectors / Hive
    • None

    Description

      This issure can reproduced by the follow sql:

      select name from tableA order by id

      b is not a column in select clause. The error message like follows

       

      Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:37 Invalid table alias or column reference 'id': (possible column names are: name)
          at org.apache.flink.table.planner.delegation.hive.copy.HiveParserSemanticAnalyzer.genAllExprNodeDesc(HiveParserSemanticAnalyzer.java:2328)
          at org.apache.flink.table.planner.delegation.hive.copy.HiveParserSemanticAnalyzer.genAllExprNodeDesc(HiveParserSemanticAnalyzer.java:2259)
          at org.apache.flink.table.planner.delegation.hive.HiveParserCalcitePlanner.genOBLogicalPlan(HiveParserCalcitePlanner.java:1650)
          at org.apache.flink.table.planner.delegation.hive.HiveParserCalcitePlanner.genLogicalPlan(HiveParserCalcitePlanner.java:2788)
          at org.apache.flink.table.planner.delegation.hive.HiveParserCalcitePlanner.logicalPlan(HiveParserCalcitePlanner.java:283)
          ... 55 more

      Attachments

        Activity

          People

            Unassigned Unassigned
            yunfanfighting@foxmail.com yunfan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: