-
Type:
Bug
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.0
-
Fix Version/s: None
-
Component/s: Parser, Query Processor, SQL
-
Labels:None
INSERT into TABLE target_table_2 partition (col3) (col1, col2,col3)
SELECT col1,col2,col3
FROM source_table
DISTRIBUTE BY col1
SORT BY col1,col2;
This Insert statement throws
Error: Error while compiling statement: FAILED: SemanticException [Error 10004]: Line 4:14 Invalid table alias or column reference 'col1':
Query is executed successfully with below workaround:
INSERT into TABLE target_table_2 partition (col3) (col1, col2,col3)
select * From (SELECT col1, col2,col3
FROM source_table
DISTRIBUTE BY col1
SORT BY col1,col2) a;