hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r1345806 [7/7] - in /hive/trunk: metastore/if/ metastore/scripts/upgrade/mysql/ metastore/scripts/upgrade/oracle/ metastore/src/gen/thrift/gen-cpp/ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ metastore/src/ge...
Date Sun, 03 Jun 2012 23:44:15 GMT
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=1345806&r1=1345805&r2=1345806&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 Sun Jun
 3 23:44:13 2012
@@ -43,7 +43,6 @@ import org.apache.commons.logging.LogFac
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
-import org.apache.hadoop.hive.metastore.TableType;
 import org.apache.hadoop.hive.metastore.Warehouse;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
 import org.apache.hadoop.hive.metastore.api.Index;
@@ -69,8 +68,6 @@ import org.apache.hadoop.hive.ql.metadat
 import org.apache.hadoop.hive.ql.metadata.HiveUtils;
 import org.apache.hadoop.hive.ql.metadata.Partition;
 import org.apache.hadoop.hive.ql.metadata.Table;
-import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.AnalyzeCreateCommonVars;
-import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.StorageFormat;
 import org.apache.hadoop.hive.ql.plan.AddPartitionDesc;
 import org.apache.hadoop.hive.ql.plan.AlterDatabaseDesc;
 import org.apache.hadoop.hive.ql.plan.AlterIndexDesc;
@@ -80,7 +77,6 @@ import org.apache.hadoop.hive.ql.plan.Al
 import org.apache.hadoop.hive.ql.plan.AlterTableSimpleDesc;
 import org.apache.hadoop.hive.ql.plan.CreateDatabaseDesc;
 import org.apache.hadoop.hive.ql.plan.CreateIndexDesc;
-import org.apache.hadoop.hive.ql.plan.CreateTableLinkDesc;
 import org.apache.hadoop.hive.ql.plan.DDLWork;
 import org.apache.hadoop.hive.ql.plan.DescDatabaseDesc;
 import org.apache.hadoop.hive.ql.plan.DescFunctionDesc;
@@ -91,7 +87,6 @@ import org.apache.hadoop.hive.ql.plan.Dr
 import org.apache.hadoop.hive.ql.plan.FetchWork;
 import org.apache.hadoop.hive.ql.plan.GrantDesc;
 import org.apache.hadoop.hive.ql.plan.GrantRevokeRoleDDL;
-import org.apache.hadoop.hive.ql.plan.HiveOperation;
 import org.apache.hadoop.hive.ql.plan.LoadTableDesc;
 import org.apache.hadoop.hive.ql.plan.LockTableDesc;
 import org.apache.hadoop.hive.ql.plan.MoveWork;
@@ -214,7 +209,7 @@ public class DDLSemanticAnalyzer extends
       break;
     }
     case HiveParser.TOK_DROPTABLE:
-      analyzeDropTable(ast, false, false);
+      analyzeDropTable(ast, false);
       break;
     case HiveParser.TOK_CREATEINDEX:
       analyzeCreateIndex(ast);
@@ -222,12 +217,6 @@ public class DDLSemanticAnalyzer extends
     case HiveParser.TOK_DROPINDEX:
       analyzeDropIndex(ast);
       break;
-    case HiveParser.TOK_CREATETABLELINK:
-      analyzeCreateTableLink(ast);
-      break;
-    case HiveParser.TOK_DROPTABLELINK:
-      analyzeDropTable(ast, false, true);
-      break;
     case HiveParser.TOK_DESCTABLE:
       ctx.setResFile(new Path(ctx.getLocalTmpFileURI()));
       analyzeDescribeTable(ast);
@@ -269,7 +258,7 @@ public class DDLSemanticAnalyzer extends
       analyzeMetastoreCheck(ast);
       break;
     case HiveParser.TOK_DROPVIEW:
-      analyzeDropTable(ast, true, false);
+      analyzeDropTable(ast, true);
       break;
     case HiveParser.TOK_ALTERVIEW_PROPERTIES:
       analyzeAlterTableProps(ast, true);
@@ -705,7 +694,7 @@ public class DDLSemanticAnalyzer extends
 
 
 
-  private void analyzeDropTable(ASTNode ast, boolean expectView, boolean expectLink)
+  private void analyzeDropTable(ASTNode ast, boolean expectView)
       throws SemanticException {
     String tableName = getUnescapedName((ASTNode)ast.getChild(0));
     boolean ifExists = (ast.getFirstChildWithType(TOK_IFEXISTS) != null);
@@ -713,40 +702,18 @@ public class DDLSemanticAnalyzer extends
     // configured not to fail silently
     boolean throwException =
       !ifExists && !HiveConf.getBoolVar(conf, ConfVars.DROPIGNORESNONEXISTENT);
-    Table tab = null;
     try {
-      tab = db.getTable(tableName, throwException);
+      Table tab = db.getTable(db.getCurrentDatabase(), tableName, throwException);
+      if (tab != null) {
+        inputs.add(new ReadEntity(tab));
+        outputs.add(new WriteEntity(tab));
+      }
     } catch (HiveException e) {
       throw new SemanticException(ErrorMsg.INVALID_TABLE.getMsg(tableName));
     }
-    if (tab != null) {
-      inputs.add(new ReadEntity(tab));
-      outputs.add(new WriteEntity(tab));
-      if (tab.isView()) {
-        if (!expectView ) {
-          if (ifExists) {
-            return;
-          }
-          throw new SemanticException(ErrorMsg.DROP_COMMAND_FOR_VIEWS.getMsg());
-        }
-      } else if (tab.isLinkTable()) {
-        if (!expectLink) {
-          if (ifExists) {
-            return;
-          }
-          throw new SemanticException(ErrorMsg.DROP_COMMAND_FOR_TABLELINKS.getMsg());
-        }
-      } else { // tab is not a View or Link.
-        if (expectView || expectLink) {
-          if (ifExists) {
-            return;
-          }
-          throw new SemanticException(ErrorMsg.DROP_COMMAND_FOR_TABLES.getMsg());
-        }
-      }
-    }
+
     DropTableDesc dropTblDesc = new DropTableDesc(
-      tableName, expectView, expectLink, ifExists, true);
+      tableName, expectView, ifExists, true);
     rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(),
         dropTblDesc), conf));
   }
@@ -853,46 +820,6 @@ public class DDLSemanticAnalyzer extends
         dropIdxDesc), conf));
   }
 
-  private void analyzeCreateTableLink(ASTNode ast) throws SemanticException {
-    String dbName = unescapeIdentifier(ast.getChild(0).getText());
-    String tableName = unescapeIdentifier(ast.getChild(1).getText());
-    boolean isStatic = false;
-    Map<String, String> linkProps = null;
-    int numCh = ast.getChildCount();
-    for (int num = 2; num < numCh; num++) {
-      ASTNode child = (ASTNode) ast.getChild(num);
-      switch(child.getToken().getType()) {
-      case HiveParser.KW_STATIC:
-        isStatic = true;
-        break;
-      case HiveParser.TOK_TABLEPROPERTIES:
-        linkProps = DDLSemanticAnalyzer.getProps((ASTNode) child.getChild(0));
-        break;
-      }
-    }
-
-    if (dbName.equals(db.getCurrentDatabase())) {
-      throw new SemanticException(ErrorMsg.TABLELINK_TO_OWN_DB.getMsg());
-    }
-    Table targetTable = null;
-    try {
-      targetTable = db.getTable(dbName, tableName);
-    } catch (HiveException e) {
-      throw new SemanticException(ErrorMsg.INVALID_TABLE.getMsg(tableName + "@" + dbName));
-    }
-
-    TableType targetType = targetTable.getTableType();
-    if (targetType != TableType.MANAGED_TABLE) {
-      throw new SemanticException(ErrorMsg.TABLELINK_TO_UNMANAGED_TABLE.getMsg());
-    }
-
-    inputs.add(new ReadEntity(targetTable));
-    CreateTableLinkDesc ctlDesc = new CreateTableLinkDesc(tableName, dbName, isStatic, linkProps);
-    SessionState.get().setCommandType(HiveOperation.CREATETABLELINK);
-    rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(),
-        ctlDesc), conf));
-  }
-
   private void analyzeAlterIndexRebuild(ASTNode ast) throws SemanticException {
     String baseTableName = unescapeIdentifier(ast.getChild(0).getText());
     String indexName = unescapeIdentifier(ast.getChild(1).getText());
@@ -1369,12 +1296,11 @@ public class DDLSemanticAnalyzer extends
   }
 
   /**
-   * Get the fully qualified name in the ast by concatenating the nodes of the binary tree
-   * in an inorder traversal order. e.g. the ast of the form ^(DOT
-   * ^(AT a b) c) will generate a name of the form a@b.c
+   * Get the fully qualified name in the ast. e.g. the ast of the form ^(DOT
+   * ^(DOT a b) c) will generate a name of the form a.b.c
    *
    * @param ast
-   *          The root node of the binary tree
+   *          The AST from which the qualified name has to be extracted
    * @return String
    */
   private String getFullyQualifiedName(ASTNode ast) {
@@ -1382,7 +1308,7 @@ public class DDLSemanticAnalyzer extends
       return ast.getText();
     }
 
-    return getFullyQualifiedName((ASTNode) ast.getChild(0)) + ast.getText()
+    return getFullyQualifiedName((ASTNode) ast.getChild(0)) + "."
         + getFullyQualifiedName((ASTNode) ast.getChild(1));
   }
 

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=1345806&r1=1345805&r2=1345806&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 Sun Jun  3 23:44:13 2012
@@ -112,7 +112,6 @@ TOK_CREATEDATABASE;
 TOK_CREATETABLE;
 TOK_CREATEINDEX;
 TOK_CREATEINDEX_INDEXTBLNAME;
-TOK_CREATETABLELINK;
 TOK_DEFERRED_REBUILDINDEX;
 TOK_DROPINDEX;
 TOK_LIKETABLE;
@@ -152,7 +151,6 @@ TOK_UNLOCKTABLE;
 TOK_SWITCHDATABASE;
 TOK_DROPDATABASE;
 TOK_DROPTABLE;
-TOK_DROPTABLELINK;
 TOK_DATABASECOMMENT;
 TOK_TABCOLLIST;
 TOK_TABCOL;
@@ -256,7 +254,6 @@ TOK_DBPROPLIST;
 TOK_ALTERDATABASE_PROPERTIES;
 TOK_ALTERTABLE_ALTERPARTS_MERGEFILES;
 TOK_TABNAME;
-TOK_TABLINKNAME;
 TOK_TABSRC;
 TOK_RESTRICT;
 TOK_CASCADE;
@@ -333,8 +330,6 @@ ddlStatement
     | dropDatabaseStatement
     | createTableStatement
     | dropTableStatement
-    | createLinkStatement
-    | dropLinkStatement
     | alterStatement
     | descStatement
     | showStatement
@@ -474,14 +469,6 @@ createTableStatement
         )
     ;
 
-createLinkStatement
-@init { msgs.push("create tablelink statement"); }
-@after { msgs.pop(); }
-	: KW_CREATE (linkOptions=KW_STATIC)? KW_TABLELINK KW_TO
-		tab=Identifier AT db=Identifier linkPropertiesPrefixed?
-	-> ^(TOK_CREATETABLELINK $db $tab $linkOptions? linkPropertiesPrefixed?) 
-	;
-
 createIndexStatement
 @init { msgs.push("create index statement");}
 @after {msgs.pop();}
@@ -561,12 +548,6 @@ dropTableStatement
 @after { msgs.pop(); }
     : KW_DROP KW_TABLE ifExists? tableName -> ^(TOK_DROPTABLE tableName ifExists?)
     ;
-    
-dropLinkStatement
-@init { msgs.push("drop link statement"); }
-@after { msgs.pop(); } 
-	: KW_DROP KW_TABLELINK ifExists? linkTableName -> ^(TOK_DROPTABLELINK linkTableName ifExists?)
-	;
 
 alterStatement
 @init { msgs.push("alter statement"); }
@@ -833,7 +814,8 @@ fileFormat
 tabTypeExpr
 @init { msgs.push("specifying table types"); }
 @after { msgs.pop(); }
-    : (Identifier AT^)? Identifier (DOT^ (Identifier | KW_ELEM_TYPE | KW_KEY_TYPE | KW_VALUE_TYPE))*
+
+   : Identifier (DOT^ (Identifier | KW_ELEM_TYPE | KW_KEY_TYPE | KW_VALUE_TYPE))*
    ;
 
 partTypeExpr
@@ -1148,14 +1130,6 @@ tablePropertiesPrefixed
         KW_TBLPROPERTIES! tableProperties
     ;
 
-linkPropertiesPrefixed
-@init { msgs.push("link properties with prefix"); }
-@after { msgs.pop(); }
-    :
-        KW_LINKPROPERTIES! tableProperties
-    ;
-
-
 tableProperties
 @init { msgs.push("table properties"); }
 @after { msgs.pop(); }
@@ -1722,13 +1696,6 @@ tableName
     : (db=Identifier DOT)? tab=Identifier
     -> ^(TOK_TABNAME $db? $tab)
     ;
-    
-linkTableName
-@init { msgs.push("link table name"); }
-@after { msgs.pop(); }
-    : tab=Identifier AT db=Identifier
-    -> ^(TOK_TABLINKNAME $db $tab)
-    ;
 
 viewName
 @init { msgs.push("view name"); }
@@ -2224,7 +2191,6 @@ KW_TABLE: 'TABLE';
 KW_TABLES: 'TABLES';
 KW_INDEX: 'INDEX';
 KW_INDEXES: 'INDEXES';
-KW_TABLELINK: 'TABLELINK';
 KW_REBUILD: 'REBUILD';
 KW_FUNCTIONS: 'FUNCTIONS';
 KW_SHOW: 'SHOW';
@@ -2329,7 +2295,6 @@ KW_LIMIT: 'LIMIT';
 KW_SET: 'SET';
 KW_TBLPROPERTIES: 'TBLPROPERTIES';
 KW_IDXPROPERTIES: 'IDXPROPERTIES';
-KW_LINKPROPERTIES: 'LINKPROPERTIES';
 KW_VALUE_TYPE: '$VALUE$';
 KW_ELEM_TYPE: '$ELEM$';
 KW_CASE: 'CASE';
@@ -2397,7 +2362,7 @@ KW_SHOW_DATABASE: 'SHOW_DATABASE';
 KW_UPDATE: 'UPDATE';
 KW_RESTRICT: 'RESTRICT';
 KW_CASCADE: 'CASCADE';
-KW_STATIC: 'STATIC';
+
 
 // Operators
 // NOTE: if you add a new function/operator, add it to sysFuncNames so that describe function
_FUNC_ will work.
@@ -2406,7 +2371,6 @@ DOT : '.'; // generated as a part of Num
 COLON : ':' ;
 COMMA : ',' ;
 SEMICOLON : ';' ;
-AT : '@' ;
 
 LPAREN : '(' ;
 RPAREN : ')' ;

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=1345806&r1=1345805&r2=1345806&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 Sun
Jun  3 23:44:13 2012
@@ -69,8 +69,6 @@ public final class SemanticAnalyzerFacto
     commandType.put(HiveParser.TOK_DROPFUNCTION, HiveOperation.DROPFUNCTION);
     commandType.put(HiveParser.TOK_CREATEVIEW, HiveOperation.CREATEVIEW);
     commandType.put(HiveParser.TOK_DROPVIEW, HiveOperation.DROPVIEW);
-    commandType.put(HiveParser.TOK_CREATETABLELINK, HiveOperation.CREATETABLELINK);
-    commandType.put(HiveParser.TOK_DROPTABLELINK, HiveOperation.DROPTABLELINK);
     commandType.put(HiveParser.TOK_CREATEINDEX, HiveOperation.CREATEINDEX);
     commandType.put(HiveParser.TOK_DROPINDEX, HiveOperation.DROPINDEX);
     commandType.put(HiveParser.TOK_ALTERINDEX_REBUILD, HiveOperation.ALTERINDEX_REBUILD);
@@ -138,7 +136,6 @@ public final class SemanticAnalyzerFacto
       case HiveParser.TOK_SWITCHDATABASE:
       case HiveParser.TOK_DROPTABLE:
       case HiveParser.TOK_DROPVIEW:
-      case HiveParser.TOK_DROPTABLELINK:
       case HiveParser.TOK_DESCDATABASE:
       case HiveParser.TOK_DESCTABLE:
       case HiveParser.TOK_DESCFUNCTION:
@@ -168,7 +165,6 @@ public final class SemanticAnalyzerFacto
       case HiveParser.TOK_SHOWLOCKS:
       case HiveParser.TOK_CREATEINDEX:
       case HiveParser.TOK_DROPINDEX:
-      case HiveParser.TOK_CREATETABLELINK:
       case HiveParser.TOK_ALTERTABLE_CLUSTER_SORT:
       case HiveParser.TOK_ALTERTABLE_TOUCH:
       case HiveParser.TOK_ALTERTABLE_ARCHIVE:

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java?rev=1345806&r1=1345805&r2=1345806&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java Sun Jun  3 23:44:13
2012
@@ -40,7 +40,6 @@ public class DDLWork implements Serializ
   private CreateTableDesc createTblDesc;
   private CreateTableLikeDesc createTblLikeDesc;
   private CreateViewDesc createVwDesc;
-  private CreateTableLinkDesc createTblLinkDesc;
   private DropTableDesc dropTblDesc;
   private AlterTableDesc alterTblDesc;
   private AlterIndexDesc alterIdxDesc;
@@ -204,16 +203,6 @@ public class DDLWork implements Serializ
   }
 
   /**
-   * @param createTblLinkDesc
-   *          create table link descriptor
-   */
-  public DDLWork(HashSet<ReadEntity> inputs, HashSet<WriteEntity> outputs,
-      CreateTableLinkDesc createTblLinkDesc) {
-    this(inputs, outputs);
-    this.createTblLinkDesc = createTblLinkDesc;
-  }
-
-  /**
    * @param dropTblDesc
    *          drop table descriptor
    */
@@ -549,22 +538,6 @@ public class DDLWork implements Serializ
   }
 
   /**
-   * @return the createTblLinkDesc
-   */
-  @Explain(displayName = "Create Table Link Operator")
-  public  CreateTableLinkDesc getCreateTblLinkDesc() {
-    return createTblLinkDesc;
-  }
-
-  /**
-   * @param createTblLinkDesc
-   *          the createTblLinkDesc to set
-   */
-  public void setCreateTblLinkDesc(CreateTableLinkDesc createTblLinkDesc) {
-    this.createTblLinkDesc = createTblLinkDesc;
-  }
-
-  /**
    * @return the dropTblDesc
    */
   @Explain(displayName = "Drop Table Operator")

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DropTableDesc.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DropTableDesc.java?rev=1345806&r1=1345805&r2=1345806&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DropTableDesc.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DropTableDesc.java Sun Jun  3 23:44:13
2012
@@ -33,7 +33,6 @@ public class DropTableDesc extends DDLDe
   String tableName;
   ArrayList<PartitionSpec> partSpecs;
   boolean expectView;
-  boolean expectLink;
   boolean ifExists;
   boolean stringPartitionColumns; // This is due to JDO not working very well with
                                   // non-string partition columns.
@@ -45,18 +44,18 @@ public class DropTableDesc extends DDLDe
   /**
    * @param tableName
    */
-  public DropTableDesc(String tableName, boolean expectView, boolean expectLink,
+  public DropTableDesc(String tableName, boolean expectView,
                        boolean ifExists, boolean stringPartitionColumns) {
     this.tableName = tableName;
     partSpecs = null;
     this.expectView = expectView;
-    this.expectLink = expectLink;
     this.ifExists = ifExists;
     this.stringPartitionColumns = stringPartitionColumns;
   }
 
   public DropTableDesc(String tableName, List<PartitionSpec> partSpecs,
                        boolean expectView, boolean stringPartitionColumns) {
+
     this.tableName = tableName;
     this.partSpecs = new ArrayList<PartitionSpec>(partSpecs.size());
     for (int i = 0; i < partSpecs.size(); i++) {
@@ -64,7 +63,6 @@ public class DropTableDesc extends DDLDe
     }
     this.expectView = expectView;
     this.stringPartitionColumns = stringPartitionColumns;
-    this.expectLink = false;
   }
 
   /**
@@ -114,21 +112,6 @@ public class DropTableDesc extends DDLDe
   }
 
   /**
-   * @return whether to expect a table link being dropped
-   */
-  public boolean getExpectLink() {
-    return expectLink;
-  }
-
-  /**
-   * @param expectLink
-   *          set whether to expect a table link being dropped
-   */
-  public void setExpectLink(boolean expectLink) {
-    this.expectLink = expectLink;
-  }
-
-  /**
    * @return whether IF EXISTS was specified
    */
   public boolean getIfExists() {

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=1345806&r1=1345805&r2=1345806&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 Sun Jun  3 23:44:13
2012
@@ -83,8 +83,6 @@ public enum HiveOperation {
   ALTERPARTITION_LOCATION("ALTERPARTITION_LOCATION", new Privilege[]{Privilege.ALTER_DATA},
null),
   CREATETABLE("CREATETABLE", null, new Privilege[]{Privilege.CREATE}),
   CREATETABLE_AS_SELECT("CREATETABLE_AS_SELECT", new Privilege[]{Privilege.SELECT}, new Privilege[]{Privilege.CREATE}),
-  CREATETABLELINK("CREATETABLELINK", null, new Privilege[]{Privilege.CREATE}),
-  DROPTABLELINK("DROPTABLELINK", null, null),
   QUERY("QUERY", new Privilege[]{Privilege.SELECT}, new Privilege[]{Privilege.ALTER_DATA,
Privilege.CREATE}),
   ALTERINDEX_PROPS("ALTERINDEX_PROPS",null, null),
   ALTERDATABASE("ALTERDATABASE", null, null),

Modified: hive/trunk/ql/src/test/results/clientnegative/drop_table_failure2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/drop_table_failure2.q.out?rev=1345806&r1=1345805&r2=1345806&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/drop_table_failure2.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/drop_table_failure2.q.out Sun Jun  3 23:44:13
2012
@@ -5,4 +5,10 @@ POSTHOOK: query: CREATE VIEW xxx6 AS SEL
 POSTHOOK: type: CREATEVIEW
 POSTHOOK: Output: default@xxx6
 #### A masked pattern was here ####
-FAILED: SemanticException [Error 10132]: To drop a view you need to use the DROP VIEW command.
+PREHOOK: query: -- Can't use DROP TABLE on a view
+DROP TABLE xxx6
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@xxx6
+PREHOOK: Output: default@xxx6
+FAILED: Error in metadata: Cannot drop a view with DROP TABLE
+FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

Modified: hive/trunk/ql/src/test/results/clientnegative/drop_view_failure1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/drop_view_failure1.q.out?rev=1345806&r1=1345805&r2=1345806&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/drop_view_failure1.q.out (original)
+++ hive/trunk/ql/src/test/results/clientnegative/drop_view_failure1.q.out Sun Jun  3 23:44:13
2012
@@ -3,4 +3,10 @@ PREHOOK: type: CREATETABLE
 POSTHOOK: query: CREATE TABLE xxx1(key int)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: default@xxx1
-FAILED: SemanticException [Error 10134]: To drop a base table you need to use the DROP TABLE
command.
+PREHOOK: query: -- Can't use DROP VIEW on a base table
+DROP VIEW xxx1
+PREHOOK: type: DROPVIEW
+PREHOOK: Input: default@xxx1
+PREHOOK: Output: default@xxx1
+FAILED: Error in metadata: Cannot drop a base table with DROP VIEW
+FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

Modified: hive/trunk/ql/src/test/results/clientpositive/create_view.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/create_view.q.out?rev=1345806&r1=1345805&r2=1345806&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/create_view.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/create_view.q.out Sun Jun  3 23:44:13 2012
@@ -714,7 +714,7 @@ c	string	
 	 	 
 #### A masked pattern was here ####
 FROM table1, viewExpandedText:SELECT `_c0` AS `c` FROM (SELECT `test_translate`('abc', 'a',
'b')	 	 
-FROM `default`.`table1`) `view8`, tableType:VIRTUAL_VIEW, linkTables:[])		 
+FROM `default`.`table1`) `view8`, tableType:VIRTUAL_VIEW)		 
 PREHOOK: query: DESCRIBE FORMATTED view8
 PREHOOK: type: DESCTABLE
 POSTHOOK: query: DESCRIBE FORMATTED view8
@@ -789,7 +789,7 @@ m	int	
 	 	 
 #### A masked pattern was here ####
 FROM src, viewExpandedText:SELECT `_c0` AS `m` FROM (SELECT `test_max`(length(`src`.`value`))
 	 
-FROM `default`.`src`) `view9`, tableType:VIRTUAL_VIEW, linkTables:[])		 
+FROM `default`.`src`) `view9`, tableType:VIRTUAL_VIEW)		 
 PREHOOK: query: DESCRIBE FORMATTED view9
 PREHOOK: type: DESCTABLE
 POSTHOOK: query: DESCRIBE FORMATTED view9
@@ -928,7 +928,7 @@ boom	int	
 	 	 
 #### A masked pattern was here ####
 FROM table1, viewExpandedText:SELECT `test_explode`(array(1,2,3)) AS (`boom`)	 	 
-FROM `default`.`table1`, tableType:VIRTUAL_VIEW, linkTables:[])		 
+FROM `default`.`table1`, tableType:VIRTUAL_VIEW)		 
 PREHOOK: query: DESCRIBE FORMATTED view11
 PREHOOK: type: DESCTABLE
 POSTHOOK: query: DESCRIBE FORMATTED view11
@@ -1082,7 +1082,7 @@ key	int	
 	 	 
 #### A masked pattern was here ####
 FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 5 ON key) s, viewExpandedText:SELECT `s`.`key`
 	 
-FROM `default`.`srcbucket` TABLESAMPLE (BUCKET 1 OUT OF 5 ON `key`) `s`, tableType:VIRTUAL_VIEW,
linkTables:[])		 
+FROM `default`.`srcbucket` TABLESAMPLE (BUCKET 1 OUT OF 5 ON `key`) `s`, tableType:VIRTUAL_VIEW)
	 
 PREHOOK: query: DESCRIBE FORMATTED view13
 PREHOOK: type: DESCTABLE
 POSTHOOK: query: DESCRIBE FORMATTED view13
@@ -1198,7 +1198,7 @@ JOIN	 	 
      (select 'tst1' as `key`, cast(count(1) as string) as `value` from `default`.`src` `s3`
 	 
                          UNION  ALL	 	 
       select `s4`.`key` as `key`, `s4`.`value` as `value` from `default`.`src` `s4` where
`s4`.`key` < 10) `unionsrc2`	 	 
-ON (`unionsrc1`.`key` = `unionsrc2`.`key`), tableType:VIRTUAL_VIEW, linkTables:[])		 
+ON (`unionsrc1`.`key` = `unionsrc2`.`key`), tableType:VIRTUAL_VIEW)		 
 PREHOOK: query: DESCRIBE FORMATTED view14
 PREHOOK: type: DESCTABLE
 POSTHOOK: query: DESCRIBE FORMATTED view14
@@ -1314,7 +1314,7 @@ value_count	bigint	
 FROM src	 	 
 GROUP BY key, viewExpandedText:SELECT `src`.`key`,COUNT(`src`.`value`) AS `value_count`	
	 
 FROM `default`.`src`	 	 
-GROUP BY `src`.`key`, tableType:VIRTUAL_VIEW, linkTables:[])		 
+GROUP BY `src`.`key`, tableType:VIRTUAL_VIEW)		 
 PREHOOK: query: DESCRIBE FORMATTED view15
 PREHOOK: type: DESCTABLE
 POSTHOOK: query: DESCRIBE FORMATTED view15
@@ -1398,7 +1398,7 @@ value	string	
 	 	 
 #### A masked pattern was here ####
 FROM src, viewExpandedText:SELECT DISTINCT `src`.`value`	 	 
-FROM `default`.`src`, tableType:VIRTUAL_VIEW, linkTables:[])		 
+FROM `default`.`src`, tableType:VIRTUAL_VIEW)		 
 PREHOOK: query: DESCRIBE FORMATTED view16
 PREHOOK: type: DESCTABLE
 POSTHOOK: query: DESCRIBE FORMATTED view16

Modified: hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out?rev=1345806&r1=1345805&r2=1345806&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out Sun Jun  3
23:44:13 2012
@@ -42,7 +42,7 @@ value	string	
 FROM src	 	 
 WHERE key=86, viewExpandedText:SELECT `src`.`key`, `src`.`value`	 	 
 FROM `default`.`src`	 	 
-WHERE `src`.`key`=86, tableType:VIRTUAL_VIEW, linkTables:[])		 
+WHERE `src`.`key`=86, tableType:VIRTUAL_VIEW)		 
 PREHOOK: query: DESCRIBE FORMATTED vp1
 PREHOOK: type: DESCTABLE
 POSTHOOK: query: DESCRIBE FORMATTED vp1

Modified: hive/trunk/ql/src/test/results/clientpositive/insert2_overwrite_partitions.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/insert2_overwrite_partitions.q.out?rev=1345806&r1=1345805&r2=1345806&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/insert2_overwrite_partitions.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/insert2_overwrite_partitions.q.out Sun Jun
 3 23:44:13 2012
@@ -285,11 +285,8 @@ POSTHOOK: Lineage: destintable PARTITION
 97	val_97
 PREHOOK: query: drop table db2.destinTable
 PREHOOK: type: DROPTABLE
-PREHOOK: Input: db2@destintable
-PREHOOK: Output: db2@destintable
 POSTHOOK: query: drop table db2.destinTable
 POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: db2@destintable
 POSTHOOK: Output: db2@destintable
 POSTHOOK: Lineage: destintable PARTITION(ds=2011-11-11).one SIMPLE [(sourcetable)sourcetable.FieldSchema(name:one,
type:string, comment:null), ]
 POSTHOOK: Lineage: destintable PARTITION(ds=2011-11-11).two SIMPLE [(sourcetable)sourcetable.FieldSchema(name:two,
type:string, comment:null), ]
@@ -297,11 +294,8 @@ POSTHOOK: Lineage: destintable PARTITION
 POSTHOOK: Lineage: destintable PARTITION(ds=2011-11-11).two SIMPLE [(sourcetable)sourcetable.FieldSchema(name:two,
type:string, comment:null), ]
 PREHOOK: query: drop table db1.sourceTable
 PREHOOK: type: DROPTABLE
-PREHOOK: Input: db1@sourcetable
-PREHOOK: Output: db1@sourcetable
 POSTHOOK: query: drop table db1.sourceTable
 POSTHOOK: type: DROPTABLE
-POSTHOOK: Input: db1@sourcetable
 POSTHOOK: Output: db1@sourcetable
 POSTHOOK: Lineage: destintable PARTITION(ds=2011-11-11).one SIMPLE [(sourcetable)sourcetable.FieldSchema(name:one,
type:string, comment:null), ]
 POSTHOOK: Lineage: destintable PARTITION(ds=2011-11-11).two SIMPLE [(sourcetable)sourcetable.FieldSchema(name:two,
type:string, comment:null), ]



Mime
View raw message