hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vineet Garg (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-18792) Allow standard compliant syntax for insert on partitioned tables
Date Tue, 27 Feb 2018 06:17:00 GMT

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

Vineet Garg commented on HIVE-18792:
------------------------------------

First patch provides support for statements such as:
{code:sql}
insert into t2 values (1,2,3,4);
{code}

Basically during metadata gathering phase if partition specification isn't provided in query
but target table has one it is auto-generated. For now I am trying to run ptests to get an
idea if I am on right path with this solution.

> Allow standard compliant syntax for insert on partitioned tables
> ----------------------------------------------------------------
>
>                 Key: HIVE-18792
>                 URL: https://issues.apache.org/jira/browse/HIVE-18792
>             Project: Hive
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Ashutosh Chauhan
>            Assignee: Vineet Garg
>            Priority: Major
>         Attachments: HIVE-18792.1.patch
>
>
> Following works:
> {code}
> create table t1 (a int, b int, c int);
> create table t2 (a int, b int, c int) partitioned by (d int);
> insert into t1 values (1,2,3);
> insert into t1 (c, b, a) values (1,2,3);
> insert into t1 (a,b) values (1,2);
> {code}
> For partitioned tables it should work similarly but doesn't.  All of following fails:
> {code}
> insert into t2 values (1,2,3,4);
> insert into t2 (a, b, c, d) values (1,2,3,4);
> insert into t2 (c,d) values (1,2);
> insert into t2 (a,b) values (1,2);
> {code}
> All of above should work. Also note following works:
> {code}
> insert into t2 partition(d)  values (1,2,3,4);
> insert into t2 partition(d=4)  values (1,2,3);
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message