hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Szehon Ho (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-8839) Support "alter table .. add/replace columns cascade"
Date Thu, 27 Nov 2014 01:54:12 GMT

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

Szehon Ho commented on HIVE-8839:
---------------------------------

I did some doc cleanup in that section: [https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterColumn|https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterColumn]
hopefully it makes sense.

Yea to answer [~leftylev]'s question, I took a look and there is already an ALTER TABLE enable
{mode} CASCADE which is not documented.  Apparently, you can enable {mode} of "NO_DROP", "OFFLINE",
and "READONLY" as of HIVE-1413.  If any mode is set, we cant drop the table.  If OFFLINE is
there then we cant query it either.  And CASCADE will extend NO_DROP protection to the children
as of HIVE-2605.  We should probably document this?

Chaoyu, yea it might make sense to create a followup JIRA as you suggested, though I dont
think any of these modes seem to be a great fit for protecting the partition from this change.

> Support "alter table .. add/replace columns cascade"
> ----------------------------------------------------
>
>                 Key: HIVE-8839
>                 URL: https://issues.apache.org/jira/browse/HIVE-8839
>             Project: Hive
>          Issue Type: Improvement
>          Components: SQL
>         Environment: 
>            Reporter: Chaoyu Tang
>            Assignee: Chaoyu Tang
>              Labels: TODOC15
>             Fix For: 0.15.0
>
>         Attachments: HIVE-8839.1.patch, HIVE-8839.2.patch, HIVE-8839.2.patch, HIVE-8839.patch
>
>
> We often run into some issues like HIVE-6131which is due to inconsistent column descriptors
between table and partitions after alter table. HIVE-8441/HIVE-7971 provided the flexibility
to alter table at partition level. But most cases we have need change the table and partitions
at same time. In addition, "alter table" is usually required prior to "alter table partition
.." since querying table partition data is also through table. Instead of do that in two steps,
here we provide a convenient ddl like "alter table ... cascade" to cascade table changes to
partitions as well. The changes are only limited and applicable to add/replace columns and
change column name, datatype, position and comment.



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

Mime
View raw message