You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Alagappan Maruthappan (Jira)" <ji...@apache.org> on 2021/02/16 07:37:00 UTC
[jira] [Updated] (HIVE-24784) Insert into table throws Invalid
column reference when select is followed by any other operation
[ https://issues.apache.org/jira/browse/HIVE-24784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alagappan Maruthappan updated HIVE-24784:
-----------------------------------------
Affects Version/s: All Versions
> Insert into table throws Invalid column reference when select is followed by any other operation
> ------------------------------------------------------------------------------------------------
>
> Key: HIVE-24784
> URL: https://issues.apache.org/jira/browse/HIVE-24784
> Project: Hive
> Issue Type: Bug
> Components: Hive, HiveServer2
> Affects Versions: All Versions
> Reporter: Alagappan Maruthappan
> Priority: Minor
>
>
> To Reproduce:
> {code:java}
> create table foo (a int, b string);
> create table bar (a int, b string);
> explain insert into foo (a, b) select a, b from bar order by b;
> 21/02/15 23:26:58 ERROR ql.Driver: FAILED: SemanticException [Error 10004]: Line 1:61 Invalid table alias or column reference 'b': (possible column names are: _col0, _col1)21/02/15 23:26:58 ERROR ql.Driver: FAILED: SemanticException [Error 10004]: Line 1:61 Invalid table alias or column reference 'b': (possible column names are: _col0, _col1)org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:61 Invalid table alias or column reference 'b': (possible column names are: _col0, _col1) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genAllExprNodeDesc(SemanticAnalyzer.java:12962) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:12904) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:12872) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:12866) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genReduceSinkPlan(SemanticAnalyzer.java:8907) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPostGroupByBodyPlan(SemanticAnalyzer.java:11028) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:10930) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:11829) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:11699) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:12415) at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:730) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12526) at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:455) at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:301) at org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:171) at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:301) at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:223) at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:104) at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:492)
> {code}
> Any operation that follows select (order by/cluster by/distribute by) throws this exception.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)