hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject svn commit: r1425604 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/ java/org/apache/hadoop/hive/ql/exec/ java/org/apache/hadoop/hive/ql/parse/ java/org/apache/hadoop/hive/ql/plan/ test/queries/clientnegative/ test/queries/clientpositive/ test...
Date Mon, 24 Dec 2012 08:40:58 GMT
Author: namit
Date: Mon Dec 24 08:40:58 2012
New Revision: 1425604

URL: http://svn.apache.org/viewvc?rev=1425604&view=rev
Log:
HIVE-3829 Hive CLI needs UNSET TBLPROPERTY command
(Zhenxiao Luo via namit)


Added:
    hive/trunk/ql/src/test/queries/clientnegative/set_table_property.q
    hive/trunk/ql/src/test/queries/clientnegative/unset_table_property.q
    hive/trunk/ql/src/test/queries/clientnegative/unset_view_property.q
    hive/trunk/ql/src/test/queries/clientpositive/unset_table_view_property.q
    hive/trunk/ql/src/test/results/clientnegative/set_table_property.q.out
    hive/trunk/ql/src/test/results/clientnegative/unset_table_property.q.out
    hive/trunk/ql/src/test/results/clientnegative/unset_view_property.q.out
    hive/trunk/ql/src/test/results/clientpositive/unset_table_view_property.q.out
Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java?rev=1425604&r1=1425603&r2=1425604&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java Mon Dec 24 08:40:58 2012
@@ -291,6 +291,10 @@ public enum ErrorMsg {
   HIVE_GROUPING_SETS_EXPR_NOT_IN_GROUPBY(10213,
     "Grouping sets expression is not in GROUP BY key"),
   INVALID_PARTITION_SPEC(10214, "Invalid partition spec specified"),
+  ALTER_TBL_UNSET_NON_EXIST_PROPERTY(10215,
+    "Please use the following syntax if not sure " +
+    "whether the property existed or not:\n" +
+    "ALTER TABLE tableName UNSET TBLPROPERTIES IF EXISTS (key1, key2, ...)\n"),
 
   SCRIPT_INIT_ERROR(20000, "Unable to initialize custom script."),
   SCRIPT_IO_ERROR(20001, "An error occurred while reading or writing to your custom script.
"

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java?rev=1425604&r1=1425603&r2=1425604&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java Mon Dec 24 08:40:58
2012
@@ -3082,6 +3082,11 @@ public class DDLTask extends Task<DDLWor
       tbl.getTTable().getSd().setCols(alterTbl.getNewCols());
     } else if (alterTbl.getOp() == AlterTableDesc.AlterTableTypes.ADDPROPS) {
       tbl.getTTable().getParameters().putAll(alterTbl.getProps());
+    } else if (alterTbl.getOp() == AlterTableDesc.AlterTableTypes.DROPPROPS) {
+      Iterator<String> keyItr = alterTbl.getProps().keySet().iterator();
+      while (keyItr.hasNext()) {
+        tbl.getTTable().getParameters().remove(keyItr.next());
+      }
     } else if (alterTbl.getOp() == AlterTableDesc.AlterTableTypes.ADDSERDEPROPS) {
       if (part != null) {
         part.getTPartition().getSd().getSerdeInfo().getParameters().putAll(

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java?rev=1425604&r1=1425603&r2=1425604&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java Mon Dec
24 08:40:58 2012
@@ -399,8 +399,10 @@ public abstract class BaseSemanticAnalyz
     for (int propChild = 0; propChild < prop.getChildCount(); propChild++) {
       String key = unescapeSQLString(prop.getChild(propChild).getChild(0)
           .getText());
-      String value = unescapeSQLString(prop.getChild(propChild).getChild(1)
-          .getText());
+      String value = null;
+      if (prop.getChild(propChild).getChild(1) != null) {
+        value = unescapeSQLString(prop.getChild(propChild).getChild(1).getText());
+      }
       mapProp.put(key, value);
     }
   }

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java?rev=1425604&r1=1425603&r2=1425604&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java Mon Dec
24 08:40:58 2012
@@ -275,7 +275,10 @@ public class DDLSemanticAnalyzer extends
       analyzeDropTable(ast, true);
       break;
     case HiveParser.TOK_ALTERVIEW_PROPERTIES:
-      analyzeAlterTableProps(ast, true);
+      analyzeAlterTableProps(ast, true, false);
+      break;
+    case HiveParser.TOK_DROPVIEW_PROPERTIES:
+      analyzeAlterTableProps(ast, true, true);
       break;
     case HiveParser.TOK_ALTERVIEW_ADDPARTS:
       // for ALTER VIEW ADD PARTITION, we wrapped the ADD to discriminate
@@ -320,7 +323,10 @@ public class DDLSemanticAnalyzer extends
       analyzeAlterTableDropParts(ast, false);
       break;
     case HiveParser.TOK_ALTERTABLE_PROPERTIES:
-      analyzeAlterTableProps(ast, false);
+      analyzeAlterTableProps(ast, false, false);
+      break;
+    case HiveParser.TOK_DROPTABLE_PROPERTIES:
+      analyzeAlterTableProps(ast, false, true);
       break;
     case HiveParser.TOK_ALTERTABLE_CLUSTER_SORT:
       analyzeAlterTableClusterSort(ast);
@@ -962,6 +968,7 @@ public class DDLSemanticAnalyzer extends
       case DROPPARTITION:
       case RENAMEPARTITION:
       case ADDPROPS:
+      case DROPPROPS:
       case RENAME:
         // allow this form
         break;
@@ -978,14 +985,21 @@ public class DDLSemanticAnalyzer extends
     }
   }
 
-  private void analyzeAlterTableProps(ASTNode ast, boolean expectView)
+  private void analyzeAlterTableProps(ASTNode ast, boolean expectView, boolean isUnset)
       throws SemanticException {
 
     String tableName = getUnescapedName((ASTNode) ast.getChild(0));
     HashMap<String, String> mapProp = getProps((ASTNode) (ast.getChild(1))
         .getChild(0));
-    AlterTableDesc alterTblDesc =
-        new AlterTableDesc(AlterTableTypes.ADDPROPS, expectView);
+    AlterTableDesc alterTblDesc = null;
+    if (isUnset == true) {
+      alterTblDesc = new AlterTableDesc(AlterTableTypes.DROPPROPS, expectView);
+      if (ast.getChild(2) != null) {
+        alterTblDesc.setDropIfExists(true);
+      }
+    } else {
+      alterTblDesc = new AlterTableDesc(AlterTableTypes.ADDPROPS, expectView);
+    }
     alterTblDesc.setProps(mapProp);
     alterTblDesc.setOldName(tableName);
 
@@ -1127,6 +1141,22 @@ public class DDLSemanticAnalyzer extends
 
     if (desc != null) {
       validateAlterTableType(tab, desc.getOp(), desc.getExpectView());
+
+      // validate Unset Non Existed Table Properties
+      if (desc.getOp() == AlterTableDesc.AlterTableTypes.DROPPROPS &&
+            desc.getIsDropIfExists() == false) {
+        Iterator<String> keyItr = desc.getProps().keySet().iterator();
+        while (keyItr.hasNext()) {
+          String currKey = keyItr.next();
+          if (tab.getTTable().getParameters().containsKey(currKey) == false) {
+            String errorMsg =
+                "The following property " + currKey +
+                " does not exist in " + tab.getTableName();
+            throw new SemanticException(
+              ErrorMsg.ALTER_TBL_UNSET_NON_EXIST_PROPERTY.getMsg(errorMsg));
+          }
+        }
+      }
     }
   }
 

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g?rev=1425604&r1=1425603&r2=1425604&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g Mon Dec 24 08:40:58 2012
@@ -119,6 +119,7 @@ TOK_CREATEINDEX;
 TOK_CREATEINDEX_INDEXTBLNAME;
 TOK_DEFERRED_REBUILDINDEX;
 TOK_DROPINDEX;
+TOK_DROPTABLE_PROPERTIES;
 TOK_LIKETABLE;
 TOK_DESCTABLE;
 TOK_DESCFUNCTION;
@@ -199,6 +200,7 @@ TOK_DROPFUNCTION;
 TOK_CREATEVIEW;
 TOK_DROPVIEW;
 TOK_ALTERVIEW_PROPERTIES;
+TOK_DROPVIEW_PROPERTIES;
 TOK_ALTERVIEW_ADDPARTS;
 TOK_ALTERVIEW_DROPPARTS;
 TOK_ALTERVIEW_RENAME;
@@ -733,6 +735,8 @@ alterStatementSuffixProperties
 @after { msgs.pop(); }
     : name=Identifier KW_SET KW_TBLPROPERTIES tableProperties
     -> ^(TOK_ALTERTABLE_PROPERTIES $name tableProperties)
+    | name=Identifier KW_UNSET KW_TBLPROPERTIES ifExists? tableProperties
+    -> ^(TOK_DROPTABLE_PROPERTIES $name tableProperties ifExists?)
     ;
 
 alterViewSuffixProperties
@@ -740,6 +744,8 @@ alterViewSuffixProperties
 @after { msgs.pop(); }
     : name=Identifier KW_SET KW_TBLPROPERTIES tableProperties
     -> ^(TOK_ALTERVIEW_PROPERTIES $name tableProperties)
+    | name=Identifier KW_UNSET KW_TBLPROPERTIES ifExists? tableProperties
+    -> ^(TOK_DROPVIEW_PROPERTIES $name tableProperties ifExists?)
     ;
 
 alterStatementSuffixSerdeProperties
@@ -1253,6 +1259,8 @@ tablePropertiesList
 @after { msgs.pop(); }
     :
       keyValueProperty (COMMA keyValueProperty)* -> ^(TOK_TABLEPROPLIST keyValueProperty+)
+    |
+      keyProperty (COMMA keyProperty)* -> ^(TOK_TABLEPROPLIST keyProperty+)
     ;
 
 keyValueProperty
@@ -1262,6 +1270,13 @@ keyValueProperty
       key=StringLiteral EQUAL value=StringLiteral -> ^(TOK_TABLEPROPERTY $key $value)
     ;
 
+keyProperty
+@init { msgs.push("specifying key property"); }
+@after { msgs.pop(); }
+    :
+      key=StringLiteral -> ^(TOK_TABLEPROPERTY $key TOK_NULL)
+    ;
+
 tableRowFormatFieldIdentifier
 @init { msgs.push("table row format's field separator"); }
 @after { msgs.pop(); }
@@ -2499,6 +2514,7 @@ KW_SERDEPROPERTIES: 'SERDEPROPERTIES';
 KW_DBPROPERTIES: 'DBPROPERTIES';
 KW_LIMIT: 'LIMIT';
 KW_SET: 'SET';
+KW_UNSET: 'UNSET';
 KW_TBLPROPERTIES: 'TBLPROPERTIES';
 KW_IDXPROPERTIES: 'IDXPROPERTIES';
 KW_VALUE_TYPE: '$VALUE$';

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java?rev=1425604&r1=1425603&r2=1425604&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java Mon
Dec 24 08:40:58 2012
@@ -56,6 +56,7 @@ public final class SemanticAnalyzerFacto
     commandType.put(HiveParser.TOK_ALTERTABLE_ARCHIVE, HiveOperation.ALTERTABLE_ARCHIVE);
     commandType.put(HiveParser.TOK_ALTERTABLE_UNARCHIVE, HiveOperation.ALTERTABLE_UNARCHIVE);
     commandType.put(HiveParser.TOK_ALTERTABLE_PROPERTIES, HiveOperation.ALTERTABLE_PROPERTIES);
+    commandType.put(HiveParser.TOK_DROPTABLE_PROPERTIES, HiveOperation.ALTERTABLE_PROPERTIES);
     commandType.put(HiveParser.TOK_ALTERTABLE_CLUSTER_SORT, HiveOperation.ALTERTABLE_CLUSTER_SORT);
     commandType.put(HiveParser.TOK_SHOWDATABASES, HiveOperation.SHOWDATABASES);
     commandType.put(HiveParser.TOK_SHOWTABLES, HiveOperation.SHOWTABLES);
@@ -76,6 +77,7 @@ public final class SemanticAnalyzerFacto
     commandType.put(HiveParser.TOK_ALTERINDEX_REBUILD, HiveOperation.ALTERINDEX_REBUILD);
     commandType.put(HiveParser.TOK_ALTERINDEX_PROPERTIES, HiveOperation.ALTERINDEX_PROPS);
     commandType.put(HiveParser.TOK_ALTERVIEW_PROPERTIES, HiveOperation.ALTERVIEW_PROPERTIES);
+    commandType.put(HiveParser.TOK_DROPVIEW_PROPERTIES, HiveOperation.ALTERVIEW_PROPERTIES);
     commandType.put(HiveParser.TOK_ALTERVIEW_ADDPARTS, HiveOperation.ALTERTABLE_ADDPARTS);
     commandType.put(HiveParser.TOK_ALTERVIEW_DROPPARTS, HiveOperation.ALTERTABLE_DROPPARTS);
     commandType.put(HiveParser.TOK_QUERY, HiveOperation.QUERY);
@@ -157,11 +159,13 @@ public final class SemanticAnalyzerFacto
       case HiveParser.TOK_ALTERTABLE_DROPPARTS:
       case HiveParser.TOK_ALTERTABLE_ADDPARTS:
       case HiveParser.TOK_ALTERTABLE_PROPERTIES:
+      case HiveParser.TOK_DROPTABLE_PROPERTIES:
       case HiveParser.TOK_ALTERTABLE_SERIALIZER:
       case HiveParser.TOK_ALTERTABLE_SERDEPROPERTIES:
       case HiveParser.TOK_ALTERINDEX_REBUILD:
       case HiveParser.TOK_ALTERINDEX_PROPERTIES:
       case HiveParser.TOK_ALTERVIEW_PROPERTIES:
+      case HiveParser.TOK_DROPVIEW_PROPERTIES:
       case HiveParser.TOK_ALTERVIEW_ADDPARTS:
       case HiveParser.TOK_ALTERVIEW_DROPPARTS:
       case HiveParser.TOK_ALTERVIEW_RENAME:

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java?rev=1425604&r1=1425603&r2=1425604&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java Mon Dec 24 08:40:58
2012
@@ -44,7 +44,7 @@ public class AlterTableDesc extends DDLD
    *
    */
   public static enum AlterTableTypes {
-    RENAME, ADDCOLS, REPLACECOLS, ADDPROPS, ADDSERDE, ADDSERDEPROPS,
+    RENAME, ADDCOLS, REPLACECOLS, ADDPROPS, DROPPROPS, ADDSERDE, ADDSERDEPROPS,
     ADDFILEFORMAT, ADDCLUSTERSORTCOLUMN, RENAMECOLUMN, ADDPARTITION,
     TOUCH, ARCHIVE, UNARCHIVE, ALTERPROTECTMODE, ALTERPARTITIONPROTECTMODE,
     ALTERLOCATION, DROPPARTITION, RENAMEPARTITION, ADDSKEWEDBY, ALTERSKEWEDLOCATION,
@@ -86,6 +86,7 @@ public class AlterTableDesc extends DDLD
   List<String> skewedColNames;
   List<List<String>> skewedColValues;
   Table table;
+  boolean isDropIfExists = false;
 
   public AlterTableDesc() {
   }
@@ -671,4 +672,18 @@ public class AlterTableDesc extends DDLD
     this.isStoredAsSubDirectories = isStoredAsSubDirectories;
   }
 
+  /**
+   * @param isDropIfExists the isDropIfExists to set
+   */
+  public void setDropIfExists(boolean isDropIfExists) {
+    this.isDropIfExists = isDropIfExists;
+  }
+
+  /**
+   * @return isDropIfExists
+   */
+  public boolean getIsDropIfExists() {
+    return isDropIfExists;
+  }
+
 }

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java?rev=1425604&r1=1425603&r2=1425604&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java Mon Dec 24 08:40:58
2012
@@ -72,6 +72,7 @@ public enum HiveOperation {
   DROPINDEX("DROPINDEX", null, null),
   ALTERINDEX_REBUILD("ALTERINDEX_REBUILD", null, null),
   ALTERVIEW_PROPERTIES("ALTERVIEW_PROPERTIES", null, null),
+  DROPVIEW_PROPERTIES("DROPVIEW_PROPERTIES", null, null),
   LOCKTABLE("LOCKTABLE",  new Privilege[]{Privilege.LOCK}, null),
   UNLOCKTABLE("UNLOCKTABLE",  new Privilege[]{Privilege.LOCK}, null),
   CREATEROLE("CREATEROLE", null, null),

Added: hive/trunk/ql/src/test/queries/clientnegative/set_table_property.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/set_table_property.q?rev=1425604&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/set_table_property.q (added)
+++ hive/trunk/ql/src/test/queries/clientnegative/set_table_property.q Mon Dec 24 08:40:58
2012
@@ -0,0 +1,4 @@
+create table testTable(col1 int, col2 int);
+
+-- set a table property = null, it should be caught by the grammar
+alter table testTable set tblproperties ('a'=);

Added: hive/trunk/ql/src/test/queries/clientnegative/unset_table_property.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/unset_table_property.q?rev=1425604&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/unset_table_property.q (added)
+++ hive/trunk/ql/src/test/queries/clientnegative/unset_table_property.q Mon Dec 24 08:40:58
2012
@@ -0,0 +1,6 @@
+CREATE TABLE testTable(col1 INT, col2 INT);
+ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'c'='3');
+SHOW TBLPROPERTIES testTable;
+
+-- unset a subset of the properties and some non-existed properties without if exists
+ALTER TABLE testTable UNSET TBLPROPERTIES ('c', 'x', 'y', 'z');

Added: hive/trunk/ql/src/test/queries/clientnegative/unset_view_property.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/unset_view_property.q?rev=1425604&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/unset_view_property.q (added)
+++ hive/trunk/ql/src/test/queries/clientnegative/unset_view_property.q Mon Dec 24 08:40:58
2012
@@ -0,0 +1,6 @@
+CREATE VIEW testView AS SELECT value FROM src WHERE key=86;
+ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propB'='200');
+SHOW TBLPROPERTIES testView;
+
+-- unset a subset of the properties and some non-existed properties without if exists
+ALTER VIEW testView UNSET TBLPROPERTIES ('propB', 'propX', 'propY', 'propZ');

Added: hive/trunk/ql/src/test/queries/clientpositive/unset_table_view_property.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/unset_table_view_property.q?rev=1425604&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/unset_table_view_property.q (added)
+++ hive/trunk/ql/src/test/queries/clientpositive/unset_table_view_property.q Mon Dec 24 08:40:58
2012
@@ -0,0 +1,64 @@
+CREATE TABLE testTable(col1 INT, col2 INT);
+SHOW TBLPROPERTIES testTable;
+
+-- UNSET TABLE PROPERTIES
+ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'c'='3');
+SHOW TBLPROPERTIES testTable;
+
+-- UNSET all the properties
+ALTER TABLE testTable UNSET TBLPROPERTIES ('a', 'c');
+SHOW TBLPROPERTIES testTable;
+
+ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'c'='3', 'd'='4');
+SHOW TBLPROPERTIES testTable;
+
+-- UNSET a subset of the properties
+ALTER TABLE testTable UNSET TBLPROPERTIES ('a', 'd');
+SHOW TBLPROPERTIES testTable;
+
+-- the same property being UNSET multiple times
+ALTER TABLE testTable UNSET TBLPROPERTIES ('c', 'c', 'c');
+SHOW TBLPROPERTIES testTable;
+
+ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'b' = '2', 'c'='3', 'd'='4');
+SHOW TBLPROPERTIES testTable;
+
+-- UNSET a subset of the properties and some non-existed properties using IF EXISTS
+ALTER TABLE testTable UNSET TBLPROPERTIES IF EXISTS ('b', 'd', 'b', 'f');
+SHOW TBLPROPERTIES testTable;
+
+-- UNSET a subset of the properties and some non-existed properties using IF EXISTS
+ALTER TABLE testTable UNSET TBLPROPERTIES IF EXISTS ('b', 'd', 'c', 'f', 'x', 'y', 'z');
+SHOW TBLPROPERTIES testTable;
+
+-- UNSET VIEW PROPERTIES
+CREATE VIEW testView AS SELECT value FROM src WHERE key=86;
+ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propB'='200');
+SHOW TBLPROPERTIES testView;
+
+-- UNSET all the properties
+ALTER VIEW testView UNSET TBLPROPERTIES ('propA', 'propB');
+SHOW TBLPROPERTIES testView;
+
+ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propC'='300', 'propD'='400');
+SHOW TBLPROPERTIES testView;
+
+-- UNSET a subset of the properties
+ALTER VIEW testView UNSET TBLPROPERTIES ('propA', 'propC');
+SHOW TBLPROPERTIES testView;
+
+-- the same property being UNSET multiple times
+ALTER VIEW testView UNSET TBLPROPERTIES ('propD', 'propD', 'propD');
+SHOW TBLPROPERTIES testView;
+
+ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propB' = '200', 'propC'='300', 'propD'='400');
+SHOW TBLPROPERTIES testView;
+
+-- UNSET a subset of the properties and some non-existed properties using IF EXISTS
+ALTER VIEW testView UNSET TBLPROPERTIES IF EXISTS ('propC', 'propD', 'propD', 'propC', 'propZ');
+SHOW TBLPROPERTIES testView;
+
+-- UNSET a subset of the properties and some non-existed properties using IF EXISTS
+ALTER VIEW testView UNSET TBLPROPERTIES IF EXISTS ('propB', 'propC', 'propD', 'propF');
+SHOW TBLPROPERTIES testView;
+

Added: hive/trunk/ql/src/test/results/clientnegative/set_table_property.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/set_table_property.q.out?rev=1425604&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/set_table_property.q.out (added)
+++ hive/trunk/ql/src/test/results/clientnegative/set_table_property.q.out Mon Dec 24 08:40:58
2012
@@ -0,0 +1,7 @@
+PREHOOK: query: create table testTable(col1 int, col2 int)
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: create table testTable(col1 int, col2 int)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: default@testTable
+FAILED: ParseException line 4:45 mismatched input ')' expecting StringLiteral near '=' in
specifying key/value property
+

Added: hive/trunk/ql/src/test/results/clientnegative/unset_table_property.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/unset_table_property.q.out?rev=1425604&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/unset_table_property.q.out (added)
+++ hive/trunk/ql/src/test/results/clientnegative/unset_table_property.q.out Mon Dec 24 08:40:58
2012
@@ -0,0 +1,26 @@
+PREHOOK: query: CREATE TABLE testTable(col1 INT, col2 INT)
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: CREATE TABLE testTable(col1 INT, col2 INT)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: default@testTable
+PREHOOK: query: ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'c'='3')
+PREHOOK: type: ALTERTABLE_PROPERTIES
+PREHOOK: Input: default@testtable
+PREHOOK: Output: default@testtable
+POSTHOOK: query: ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'c'='3')
+POSTHOOK: type: ALTERTABLE_PROPERTIES
+POSTHOOK: Input: default@testtable
+POSTHOOK: Output: default@testtable
+PREHOOK: query: SHOW TBLPROPERTIES testTable
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testTable
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+c	3
+#### A masked pattern was here ####
+a	1
+#### A masked pattern was here ####
+FAILED: SemanticException [Error 10215]: Please use the following syntax if not sure whether
the property existed or not:
+ALTER TABLE tableName UNSET TBLPROPERTIES IF EXISTS (key1, key2, ...)
+ The following property z does not exist in testtable

Added: hive/trunk/ql/src/test/results/clientnegative/unset_view_property.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/unset_view_property.q.out?rev=1425604&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/unset_view_property.q.out (added)
+++ hive/trunk/ql/src/test/results/clientnegative/unset_view_property.q.out Mon Dec 24 08:40:58
2012
@@ -0,0 +1,27 @@
+PREHOOK: query: CREATE VIEW testView AS SELECT value FROM src WHERE key=86
+PREHOOK: type: CREATEVIEW
+#### A masked pattern was here ####
+POSTHOOK: query: CREATE VIEW testView AS SELECT value FROM src WHERE key=86
+POSTHOOK: type: CREATEVIEW
+POSTHOOK: Output: default@testView
+#### A masked pattern was here ####
+PREHOOK: query: ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propB'='200')
+PREHOOK: type: ALTERVIEW_PROPERTIES
+PREHOOK: Input: default@testview
+PREHOOK: Output: default@testview
+POSTHOOK: query: ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propB'='200')
+POSTHOOK: type: ALTERVIEW_PROPERTIES
+POSTHOOK: Input: default@testview
+POSTHOOK: Output: default@testview
+PREHOOK: query: SHOW TBLPROPERTIES testView
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testView
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+propA	100
+propB	200
+#### A masked pattern was here ####
+FAILED: SemanticException [Error 10215]: Please use the following syntax if not sure whether
the property existed or not:
+ALTER TABLE tableName UNSET TBLPROPERTIES IF EXISTS (key1, key2, ...)
+ The following property propX does not exist in testview

Added: hive/trunk/ql/src/test/results/clientpositive/unset_table_view_property.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/unset_table_view_property.q.out?rev=1425604&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/unset_table_view_property.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/unset_table_view_property.q.out Mon Dec
24 08:40:58 2012
@@ -0,0 +1,307 @@
+PREHOOK: query: CREATE TABLE testTable(col1 INT, col2 INT)
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: CREATE TABLE testTable(col1 INT, col2 INT)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: default@testTable
+PREHOOK: query: SHOW TBLPROPERTIES testTable
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testTable
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+PREHOOK: query: -- UNSET TABLE PROPERTIES
+ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'c'='3')
+PREHOOK: type: ALTERTABLE_PROPERTIES
+PREHOOK: Input: default@testtable
+PREHOOK: Output: default@testtable
+POSTHOOK: query: -- UNSET TABLE PROPERTIES
+ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'c'='3')
+POSTHOOK: type: ALTERTABLE_PROPERTIES
+POSTHOOK: Input: default@testtable
+POSTHOOK: Output: default@testtable
+PREHOOK: query: SHOW TBLPROPERTIES testTable
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testTable
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+c	3
+#### A masked pattern was here ####
+a	1
+#### A masked pattern was here ####
+PREHOOK: query: -- UNSET all the properties
+ALTER TABLE testTable UNSET TBLPROPERTIES ('a', 'c')
+PREHOOK: type: ALTERTABLE_PROPERTIES
+PREHOOK: Input: default@testtable
+PREHOOK: Output: default@testtable
+POSTHOOK: query: -- UNSET all the properties
+ALTER TABLE testTable UNSET TBLPROPERTIES ('a', 'c')
+POSTHOOK: type: ALTERTABLE_PROPERTIES
+POSTHOOK: Input: default@testtable
+POSTHOOK: Output: default@testtable
+PREHOOK: query: SHOW TBLPROPERTIES testTable
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testTable
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+PREHOOK: query: ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'c'='3', 'd'='4')
+PREHOOK: type: ALTERTABLE_PROPERTIES
+PREHOOK: Input: default@testtable
+PREHOOK: Output: default@testtable
+POSTHOOK: query: ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'c'='3', 'd'='4')
+POSTHOOK: type: ALTERTABLE_PROPERTIES
+POSTHOOK: Input: default@testtable
+POSTHOOK: Output: default@testtable
+PREHOOK: query: SHOW TBLPROPERTIES testTable
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testTable
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+d	4
+#### A masked pattern was here ####
+c	3
+#### A masked pattern was here ####
+a	1
+#### A masked pattern was here ####
+PREHOOK: query: -- UNSET a subset of the properties
+ALTER TABLE testTable UNSET TBLPROPERTIES ('a', 'd')
+PREHOOK: type: ALTERTABLE_PROPERTIES
+PREHOOK: Input: default@testtable
+PREHOOK: Output: default@testtable
+POSTHOOK: query: -- UNSET a subset of the properties
+ALTER TABLE testTable UNSET TBLPROPERTIES ('a', 'd')
+POSTHOOK: type: ALTERTABLE_PROPERTIES
+POSTHOOK: Input: default@testtable
+POSTHOOK: Output: default@testtable
+PREHOOK: query: SHOW TBLPROPERTIES testTable
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testTable
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+c	3
+#### A masked pattern was here ####
+PREHOOK: query: -- the same property being UNSET multiple times
+ALTER TABLE testTable UNSET TBLPROPERTIES ('c', 'c', 'c')
+PREHOOK: type: ALTERTABLE_PROPERTIES
+PREHOOK: Input: default@testtable
+PREHOOK: Output: default@testtable
+POSTHOOK: query: -- the same property being UNSET multiple times
+ALTER TABLE testTable UNSET TBLPROPERTIES ('c', 'c', 'c')
+POSTHOOK: type: ALTERTABLE_PROPERTIES
+POSTHOOK: Input: default@testtable
+POSTHOOK: Output: default@testtable
+PREHOOK: query: SHOW TBLPROPERTIES testTable
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testTable
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+PREHOOK: query: ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'b' = '2', 'c'='3', 'd'='4')
+PREHOOK: type: ALTERTABLE_PROPERTIES
+PREHOOK: Input: default@testtable
+PREHOOK: Output: default@testtable
+POSTHOOK: query: ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'b' = '2', 'c'='3', 'd'='4')
+POSTHOOK: type: ALTERTABLE_PROPERTIES
+POSTHOOK: Input: default@testtable
+POSTHOOK: Output: default@testtable
+PREHOOK: query: SHOW TBLPROPERTIES testTable
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testTable
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+d	4
+#### A masked pattern was here ####
+b	2
+c	3
+#### A masked pattern was here ####
+a	1
+#### A masked pattern was here ####
+PREHOOK: query: -- UNSET a subset of the properties and some non-existed properties using
IF EXISTS
+ALTER TABLE testTable UNSET TBLPROPERTIES IF EXISTS ('b', 'd', 'b', 'f')
+PREHOOK: type: ALTERTABLE_PROPERTIES
+PREHOOK: Input: default@testtable
+PREHOOK: Output: default@testtable
+POSTHOOK: query: -- UNSET a subset of the properties and some non-existed properties using
IF EXISTS
+ALTER TABLE testTable UNSET TBLPROPERTIES IF EXISTS ('b', 'd', 'b', 'f')
+POSTHOOK: type: ALTERTABLE_PROPERTIES
+POSTHOOK: Input: default@testtable
+POSTHOOK: Output: default@testtable
+PREHOOK: query: SHOW TBLPROPERTIES testTable
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testTable
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+c	3
+#### A masked pattern was here ####
+a	1
+#### A masked pattern was here ####
+PREHOOK: query: -- UNSET a subset of the properties and some non-existed properties using
IF EXISTS
+ALTER TABLE testTable UNSET TBLPROPERTIES IF EXISTS ('b', 'd', 'c', 'f', 'x', 'y', 'z')
+PREHOOK: type: ALTERTABLE_PROPERTIES
+PREHOOK: Input: default@testtable
+PREHOOK: Output: default@testtable
+POSTHOOK: query: -- UNSET a subset of the properties and some non-existed properties using
IF EXISTS
+ALTER TABLE testTable UNSET TBLPROPERTIES IF EXISTS ('b', 'd', 'c', 'f', 'x', 'y', 'z')
+POSTHOOK: type: ALTERTABLE_PROPERTIES
+POSTHOOK: Input: default@testtable
+POSTHOOK: Output: default@testtable
+PREHOOK: query: SHOW TBLPROPERTIES testTable
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testTable
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+a	1
+#### A masked pattern was here ####
+PREHOOK: query: -- UNSET VIEW PROPERTIES
+CREATE VIEW testView AS SELECT value FROM src WHERE key=86
+PREHOOK: type: CREATEVIEW
+#### A masked pattern was here ####
+POSTHOOK: query: -- UNSET VIEW PROPERTIES
+CREATE VIEW testView AS SELECT value FROM src WHERE key=86
+POSTHOOK: type: CREATEVIEW
+POSTHOOK: Output: default@testView
+#### A masked pattern was here ####
+PREHOOK: query: ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propB'='200')
+PREHOOK: type: ALTERVIEW_PROPERTIES
+PREHOOK: Input: default@testview
+PREHOOK: Output: default@testview
+POSTHOOK: query: ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propB'='200')
+POSTHOOK: type: ALTERVIEW_PROPERTIES
+POSTHOOK: Input: default@testview
+POSTHOOK: Output: default@testview
+PREHOOK: query: SHOW TBLPROPERTIES testView
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testView
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+propA	100
+propB	200
+#### A masked pattern was here ####
+PREHOOK: query: -- UNSET all the properties
+ALTER VIEW testView UNSET TBLPROPERTIES ('propA', 'propB')
+PREHOOK: type: ALTERVIEW_PROPERTIES
+PREHOOK: Input: default@testview
+PREHOOK: Output: default@testview
+POSTHOOK: query: -- UNSET all the properties
+ALTER VIEW testView UNSET TBLPROPERTIES ('propA', 'propB')
+POSTHOOK: type: ALTERVIEW_PROPERTIES
+POSTHOOK: Input: default@testview
+POSTHOOK: Output: default@testview
+PREHOOK: query: SHOW TBLPROPERTIES testView
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testView
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+PREHOOK: query: ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propC'='300', 'propD'='400')
+PREHOOK: type: ALTERVIEW_PROPERTIES
+PREHOOK: Input: default@testview
+PREHOOK: Output: default@testview
+POSTHOOK: query: ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propC'='300', 'propD'='400')
+POSTHOOK: type: ALTERVIEW_PROPERTIES
+POSTHOOK: Input: default@testview
+POSTHOOK: Output: default@testview
+PREHOOK: query: SHOW TBLPROPERTIES testView
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testView
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+propA	100
+#### A masked pattern was here ####
+propD	400
+propC	300
+PREHOOK: query: -- UNSET a subset of the properties
+ALTER VIEW testView UNSET TBLPROPERTIES ('propA', 'propC')
+PREHOOK: type: ALTERVIEW_PROPERTIES
+PREHOOK: Input: default@testview
+PREHOOK: Output: default@testview
+POSTHOOK: query: -- UNSET a subset of the properties
+ALTER VIEW testView UNSET TBLPROPERTIES ('propA', 'propC')
+POSTHOOK: type: ALTERVIEW_PROPERTIES
+POSTHOOK: Input: default@testview
+POSTHOOK: Output: default@testview
+PREHOOK: query: SHOW TBLPROPERTIES testView
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testView
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+propD	400
+PREHOOK: query: -- the same property being UNSET multiple times
+ALTER VIEW testView UNSET TBLPROPERTIES ('propD', 'propD', 'propD')
+PREHOOK: type: ALTERVIEW_PROPERTIES
+PREHOOK: Input: default@testview
+PREHOOK: Output: default@testview
+POSTHOOK: query: -- the same property being UNSET multiple times
+ALTER VIEW testView UNSET TBLPROPERTIES ('propD', 'propD', 'propD')
+POSTHOOK: type: ALTERVIEW_PROPERTIES
+POSTHOOK: Input: default@testview
+POSTHOOK: Output: default@testview
+PREHOOK: query: SHOW TBLPROPERTIES testView
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testView
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+PREHOOK: query: ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propB' = '200', 'propC'='300',
'propD'='400')
+PREHOOK: type: ALTERVIEW_PROPERTIES
+PREHOOK: Input: default@testview
+PREHOOK: Output: default@testview
+POSTHOOK: query: ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propB' = '200', 'propC'='300',
'propD'='400')
+POSTHOOK: type: ALTERVIEW_PROPERTIES
+POSTHOOK: Input: default@testview
+POSTHOOK: Output: default@testview
+PREHOOK: query: SHOW TBLPROPERTIES testView
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testView
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+propA	100
+propB	200
+#### A masked pattern was here ####
+propD	400
+propC	300
+PREHOOK: query: -- UNSET a subset of the properties and some non-existed properties using
IF EXISTS
+ALTER VIEW testView UNSET TBLPROPERTIES IF EXISTS ('propC', 'propD', 'propD', 'propC', 'propZ')
+PREHOOK: type: ALTERVIEW_PROPERTIES
+PREHOOK: Input: default@testview
+PREHOOK: Output: default@testview
+POSTHOOK: query: -- UNSET a subset of the properties and some non-existed properties using
IF EXISTS
+ALTER VIEW testView UNSET TBLPROPERTIES IF EXISTS ('propC', 'propD', 'propD', 'propC', 'propZ')
+POSTHOOK: type: ALTERVIEW_PROPERTIES
+POSTHOOK: Input: default@testview
+POSTHOOK: Output: default@testview
+PREHOOK: query: SHOW TBLPROPERTIES testView
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testView
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+propA	100
+propB	200
+#### A masked pattern was here ####
+PREHOOK: query: -- UNSET a subset of the properties and some non-existed properties using
IF EXISTS
+ALTER VIEW testView UNSET TBLPROPERTIES IF EXISTS ('propB', 'propC', 'propD', 'propF')
+PREHOOK: type: ALTERVIEW_PROPERTIES
+PREHOOK: Input: default@testview
+PREHOOK: Output: default@testview
+POSTHOOK: query: -- UNSET a subset of the properties and some non-existed properties using
IF EXISTS
+ALTER VIEW testView UNSET TBLPROPERTIES IF EXISTS ('propB', 'propC', 'propD', 'propF')
+POSTHOOK: type: ALTERVIEW_PROPERTIES
+POSTHOOK: Input: default@testview
+POSTHOOK: Output: default@testview
+PREHOOK: query: SHOW TBLPROPERTIES testView
+PREHOOK: type: SHOW_TBLPROPERTIES
+POSTHOOK: query: SHOW TBLPROPERTIES testView
+POSTHOOK: type: SHOW_TBLPROPERTIES
+	 
+#### A masked pattern was here ####
+propA	100
+#### A masked pattern was here ####



Mime
View raw message