[ https://issues.apache.org/jira/browse/HIVE-1078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067334#comment-13067334 ]
jirapos...@reviews.apache.org commented on HIVE-1078: ----------------------------------------------------- ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1058/#review1102 ----------------------------------------------------------- http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java <https://reviews.apache.org/r/1058/#comment2236> We'll allow this if no partitions currently exist. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java <https://reviews.apache.org/r/1058/#comment2237> Shouldn't we allow for changes to the view comment? Also, any TBLPROPERTIES specified here should be applied to the view (but we shouldn't delete old ones, only overwrite them if they already exist). http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/queries/clientpositive/create_or_replace_view.q <https://reviews.apache.org/r/1058/#comment2235> These need explicit PARTITIONED ON clauses to indicate that the existing partitioning scheme is being preserved. Also, need test case for modifying the definition of an unpartitioned view. Plus new cases we discussed for allowing change in partitioning when no partitions currently exist. Also, negative case for combining IF NOT EXISTS with OR REPLACE. Also, negative case for updating the view to have an invalid definition. Also, positive case for using this to "fix" an invalid view. Have you tried creating a "view cycle"? - John On 2011-07-18 07:01:02, Charles Chen wrote: bq. bq. ----------------------------------------------------------- bq. This is an automatically generated e-mail. To reply, visit: bq. https://reviews.apache.org/r/1058/ bq. ----------------------------------------------------------- bq. bq. (Updated 2011-07-18 07:01:02) bq. bq. bq. Review request for hive. bq. bq. bq. Summary bq. ------- bq. bq. https://issues.apache.org/jira/browse/HIVE-1078 bq. bq. bq. This addresses bug HIVE-1078. bq. https://issues.apache.org/jira/browse/HIVE-1078 bq. bq. bq. Diffs bq. ----- bq. bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/clientpositive/create_view.q.out 1146902 bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/clientpositive/create_or_replace_view.q.out PRE-CREATION bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view4.q.out PRE-CREATION bq. http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 1146902 bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 1146902 bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g 1146902 bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 1146902 bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/CreateViewDesc.java 1146902 bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/queries/clientnegative/create_or_replace_view1.q PRE-CREATION bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/queries/clientnegative/create_or_replace_view2.q PRE-CREATION bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/queries/clientnegative/create_or_replace_view3.q PRE-CREATION bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/queries/clientnegative/create_or_replace_view4.q PRE-CREATION bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/queries/clientpositive/create_or_replace_view.q PRE-CREATION bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view1.q.out PRE-CREATION bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view2.q.out PRE-CREATION bq. http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/clientnegative/create_or_replace_view3.q.out PRE-CREATION bq. bq. Diff: https://reviews.apache.org/r/1058/diff bq. bq. bq. Testing bq. ------- bq. bq. Passes unit tests bq. bq. bq. Thanks, bq. bq. Charles bq. bq. > CREATE VIEW followup: CREATE OR REPLACE > ---------------------------------------- > > Key: HIVE-1078 > URL: https://issues.apache.org/jira/browse/HIVE-1078 > Project: Hive > Issue Type: Improvement > Components: Query Processor > Affects Versions: 0.6.0 > Reporter: John Sichi > Assignee: Charles Chen > Attachments: HIVE-1078v3.patch, HIVE-1078v4.patch, HIVE-1078v5.patch, > HIVE-1078v6.patch > > > Currently, replacing a view requires > DROP VIEW v; > CREATE VIEW v AS <new-definition>; > CREATE OR REPLACE would allow these to be combined into a single operation. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira