Riju Trivedi created HIVE-19255:
-----------------------------------
Summary: Hive doesn't support column list specification in INSERT
into statements with distribute by/Cluster by
Key: HIVE-19255
URL: https://issues.apache.org/jira/browse/HIVE-19255
Project: Hive
Issue Type: Bug
Components: Parser, Query Processor, SQL
Affects Versions: 1.2.0
Reporter: Riju Trivedi
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;
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)