yunfan created FLINK-31865:
------------------------------

             Summary: Flink hive parser support order by non select column
                 Key: FLINK-31865
                 URL: https://issues.apache.org/jira/browse/FLINK-31865
             Project: Flink
          Issue Type: Improvement
          Components: Connectors / Hive
            Reporter: yunfan


This issure can reproduced by the follow sql:
{code:java}
select name from tableA order by id{code}
b is not a column in select clause. The error message like follows

 
{code:java}
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{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to