[
https://issues.apache.org/jira/browse/HIVE-967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455158#comment-13455158
]
Steven Wong commented on HIVE-967:
----------------------------------
@Kevin,
https://cwiki.apache.org/confluence/display/Hive/ViewDev#ViewDev-StoredViewDefinition
explains "frozen at the time the view is created" better than I can.
Here is the scenario I have in mind:
# Create a view v as select * from t, where t is a table with columns a and b.
Hence, select * from v will return a and b.
# Add a new column c to t. Per the view dev wiki page above, select * from v
will still return just a and b.
# Do show create table on v and save the output.
# Drop v. (Maybe this is done intentionally, accidentally, or maliciously by
someone else.)
# Run the saved output to re-create v.
# Now, should select * from v return just a and b, or should it return a, b,
and c? This is basically the issue I'm trying to point out. I think "a and b"
looks like the better answer, which will mean using getViewExpandedText in show
create table.
> Implement "show create table"
> -----------------------------
>
> Key: HIVE-967
> URL: https://issues.apache.org/jira/browse/HIVE-967
> Project: Hive
> Issue Type: New Feature
> Components: Metastore, Query Processor
> Reporter: Adam Kramer
> Assignee: Feng Lu
> Attachments: HIVE-967.2.patch.txt, HIVE-967.3.patch.txt,
> HIVE-967.4.patch.txt, HIVE-967.5.patch.txt, HIVE-967.patch.txt,
> HiveShowCreateTable.jar, show_create.txt
>
>
> SHOW CREATE TABLE would be very useful in cases where you are trying to
> figure out the partitioning and/or bucketing scheme for a table. Perhaps this
> could be implemented by having new tables automatically SET PROPERTIES
> (create_command='raw text of the create statement')?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira