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

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

     [ https://issues.apache.org/jira/browse/HIVE-16300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on HIVE-16300 started by Kostyantyn Oliynyk.
-------------------------------------------------
> Allow to specify target table columns in static partition 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
>            Assignee: Kostyantyn Oliynyk
>            Priority: Trivial
>
> It is not possible to specify target table columns in static partition insert.
> As a result SQL parser will throw an error if fields from sub select does not match target table fields.
> For example for the following table
> CREATE TABLE my_table(col1 STRING, col2 STRING, col3 STRING) PARTITIONED BY (pcol STRING);
> following insert will failed due to different number of fields in select and in target table:
> INSERT OVERWRITE TABLE my_table
> PARTITION(pcol='TEST')
> SELECT 'A' as a, 'B'as b;
> Proposed change adds support for the following syntax:
> INSERT OVERWRITE TABLE my_table
> PARTITION(pcol='TEST')
> *(col1, col3)*
> SELECT 'A' as a, 'B'as b;
> Issue is marked with Trivial priority as it has workaround such as using dynamic partition insert. 



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