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

Suma Shivaprasad commented on ATLAS-523:
----------------------------------------

A view could initially be created and associated with traits/tags. We need to 
retain these tags after view alteration as well since the impact of the changes 
done and whether the tag should be retained or not is subjective. 

Alter view can result in either 

a.  The complete view definition change eg: A view could be created from a 
completely different set of input tables - in this case the tags associated 
with the new table should ideally be propagated. However since the user has 
associated this with the view explicitly, it is safer to retain the associated 
tags/traits with the new view definition as well.

b. New column(s), tables(s) could be added or dropped from the view - In this 
case it makes sense to retain the tags associated with the view.

In both of the above cases, if we update the view definition instead of 
dropping and creating the view definition again, it will ensure that the 
existing traits are not lost. 

One caveat is that since we do not have the old state of the view definition 
available through hive interface, there is no easy way to drop the 'create 
view' process that initially created the view. Hence the lineage will continue 
to show all the older view definition process that were involved with the 
creation and alteration of the view at any point in time.

Thoughts?






> Support alter view
> ------------------
>
>                 Key: ATLAS-523
>                 URL: https://issues.apache.org/jira/browse/ATLAS-523
>             Project: Atlas
>          Issue Type: Sub-task
>            Reporter: Suma Shivaprasad
>             Fix For: 0.7-incubating
>
>
> support alter view as select , drop, properties - 
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Create/Drop/AlterView



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

Reply via email to