You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Kostyantyn Oliynyk (JIRA)" <ji...@apache.org> on 2017/03/26 20:58:41 UTC

[jira] [Created] (HIVE-16300) Allow specify target table columns in partition static insert

Kostyantyn Oliynyk created HIVE-16300:
-----------------------------------------

             Summary: Allow specify target table columns in partition static insert
                 Key: HIVE-16300
                 URL: https://issues.apache.org/jira/browse/HIVE-16300
             Project: Hive
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 2.1.1
            Reporter: Kostyantyn Oliynyk
            Priority: Trivial


It is not possible specify target table columns with static partition insert, like:
Let my_table have 5 columns (col1,col2,col3,col4,col) partitioned by (partition_field STRING).
SQL parser will throw an error if select fields does not match target table fields for static partition insert:

INSERT OVERWRITE TABLE my_table
PARTITION(partition_field='value')
SELECT a, c FROM another_table;
  

It is proposed add ability to specify target coluns 
INSERT OVERWRITE TABLE my_table
PARTITION(partition_field='value')
*(col1, col5)*
SELECT a, c FROM another_table;

As a result SQL parser will throw an error if select fields does not match target table fields.  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)