You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Adam Szita (JIRA)" <ji...@apache.org> on 2017/02/10 14:36:42 UTC

[jira] [Commented] (HIVE-13780) Allow user to update AVRO table schema via command even if table's definition was defined through schema file

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

Adam Szita commented on HIVE-13780:
-----------------------------------

Approach in [^HIVE-13780.0.patch]:
-added new config property to enable leaving schema literal / url tblproperties upon ALTER TABLE commands on Avro table
-if this property is set, ALTER TABLE command will clear the schema literal and url parameters (if set) and will update HMS with the new schema
-HMS will be responsible for handling the schema

> Allow user to update AVRO table schema via command even if table's definition was defined through schema file
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-13780
>                 URL: https://issues.apache.org/jira/browse/HIVE-13780
>             Project: Hive
>          Issue Type: Improvement
>          Components: CLI
>    Affects Versions: 2.0.0
>            Reporter: Eric Lin
>            Assignee: Adam Szita
>            Priority: Minor
>         Attachments: HIVE-13780.0.patch
>
>
> If a table is defined as below:
> {code}
> CREATE TABLE test
> STORED AS AVRO 
> TBLPROPERTIES ('avro.schema.url'='/tmp/schema.json');
> {code}
> if user tries to run command:
> {code}
> ALTER TABLE test CHANGE COLUMN col1 col1 STRING COMMENT 'test comment';
> {code}
> The query will return without any warning, but has no affect to the table.
> It would be good if we can allow user to ALTER table (add/change column, update comment etc) even though the schema is defined through schema file.



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