You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Anthony Hsu (JIRA)" <ji...@apache.org> on 2016/12/09 21:23:58 UTC

[jira] [Commented] (HIVE-15411) ADD PARTITION should support setting FILEFORMAT and SERDEPROPERTIES

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

Anthony Hsu commented on HIVE-15411:
------------------------------------

Proposal is to extend the ADD PARTITION grammar to support the following:
{noformat}
ALTER TABLE table_name ADD [IF NOT EXISTS]
PARTITION (part_col='part_value', ...)
  [FILEFORMAT <format>]                  -- new
  [SERDEPROPERTIES ('key1'='val', ...)]  -- new
  [LOCATION 'location1']
PARTITION (part_col='part_value', ...)
  [FILEFORMAT <format>]                  -- new
  [SERDEPROPERTIES ('key1'='val', ...)]  -- new
  [LOCATION 'location2']
...;
{noformat}

> ADD PARTITION should support setting FILEFORMAT and SERDEPROPERTIES
> -------------------------------------------------------------------
>
>                 Key: HIVE-15411
>                 URL: https://issues.apache.org/jira/browse/HIVE-15411
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Anthony Hsu
>            Assignee: Anthony Hsu
>
> Currently, {{ALTER TABLE ... ADD PARTITION}} only lets you set the partition's LOCATION but not its FILEFORMAT or SERDEPROPERTIES. In order to change the FILEFORMAT or SERDEPROPERTIES, you have to issue two additional calls to {{ALTER TABLE ... PARTITION ... SET FILEFORMAT}} and {{ALTER TABLE ... PARTITION ... SET SERDEPROPERTIES}}. This is not atomic, and queries that interleave the ALTER TABLE commands may fail.
> We should extend the grammar to support setting FILEFORMAT and SERDEPROPERTIES atomically as part of the ADD PARTITION command.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)