hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kostyantyn Oliynyk (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-16300) Allow to specify target table columns in static partition insert
Date Mon, 27 Mar 2017 01:50:41 GMT

    [ https://issues.apache.org/jira/browse/HIVE-16300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15942522#comment-15942522
] 

Kostyantyn Oliynyk commented on HIVE-16300:
-------------------------------------------

Inability to change files in Hadoop makes use of partitions critical for the INSERT/UPDATE/DELETE/MERGE
operations as the one can greatly reduce size of the file need to be rewritten. That is why
I added proposed change in my local copy :)
   

> 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)

Mime
View raw message