You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2018/02/24 00:08:00 UTC

[jira] [Commented] (HIVE-18792) Allow standard compliant syntax for insert on partitioned tables

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

Ashutosh Chauhan commented on HIVE-18792:
-----------------------------------------

In essence following 4 items need to reconciled:

1. Partition clause is required which should be made optional. 

2. Schema should be allowed to be specified on partitioned tables.

3. This should work in same manner with select clause (in addition to values clause)

4. Update/delete statement should allow this syntax. 

> 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
>            Priority: Major
>
> 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)