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

Chaoyu Tang commented on HIVE-8839:
-----------------------------------

[~jdere] Thanks for the comments. Yes, I think it is good to have a 
configuration as a safeguard to this operation but I am not sure if the 
explicit need of CASCADE in DDL is sufficient. in HIVE-8411, as I understood, 
hive.exec.dynamic.partition is required to be enabled for alter table 
partitions with partial partition spec (or dynamic partitions), which can be 
used as a safeguard and to distinguish from that with full partition spec 
(static partition). It is consistent with the need of this configuration in 
other operations involving DP vs. SP.  Is my understanding right? 
If a second safeguard is needed, we may add a different property like 
hive.alter.table.support.cascade. But I wonder if it is necessary, like drop 
table .. cascade, we do not have a configuration as an addition safeguard.

> 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
>             Fix For: 0.15.0
>
>         Attachments: HIVE-8839.1.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)

Reply via email to