hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xu...@apache.org
Subject hive git commit: Revert "HIVE-9828: Semantic analyzer does not capture view parent entity for tables referred in view with union all (Prasad via Xuefu)"
Date Sat, 09 May 2015 09:28:44 GMT
Repository: hive
Updated Branches:
  refs/heads/spark 158cce305 -> bf9146c48


Revert "HIVE-9828: Semantic analyzer does not capture view parent entity for tables referred
in view with union all (Prasad via Xuefu)"

This reverts commit 158cce30541203317dd11e9a29f723fd71e3e5f0. Reason: committed to the wrong
branch.


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/bf9146c4
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/bf9146c4
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/bf9146c4

Branch: refs/heads/spark
Commit: bf9146c48206fa14e03daaa15bc46116cf0a4644
Parents: 158cce3
Author: Xuefu Zhang <xzhang@Cloudera.com>
Authored: Sat May 9 02:28:11 2015 -0700
Committer: Xuefu Zhang <xzhang@Cloudera.com>
Committed: Sat May 9 02:28:11 2015 -0700

----------------------------------------------------------------------
 .../hadoop/hive/ql/parse/SemanticAnalyzer.java       | 15 ++++++---------
 .../org/apache/hadoop/hive/ql/plan/PlanUtils.java    |  4 ----
 2 files changed, 6 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/bf9146c4/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index 19e8f25..57de8b3 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -222,9 +222,6 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
 
   public static final String DUMMY_DATABASE = "_dummy_database";
   public static final String DUMMY_TABLE = "_dummy_table";
-  public static final String SUBQUERY_TAG_1 = "-subquery1";
-  public static final String SUBQUERY_TAG_2 = "-subquery2";
-
   // Max characters when auto generating the column name with func name
   private static final int AUTOGEN_COLALIAS_PRFX_MAXLENGTH = 20;
 
@@ -432,16 +429,16 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
       qbexpr.setOpcode(QBExpr.Opcode.UNION);
       // query 1
       assert (ast.getChild(0) != null);
-      QBExpr qbexpr1 = new QBExpr(alias + SUBQUERY_TAG_1);
-      doPhase1QBExpr((ASTNode) ast.getChild(0), qbexpr1, id + SUBQUERY_TAG_1,
-          alias + SUBQUERY_TAG_1);
+      QBExpr qbexpr1 = new QBExpr(alias + "-subquery1");
+      doPhase1QBExpr((ASTNode) ast.getChild(0), qbexpr1, id + "-subquery1",
+          alias + "-subquery1");
       qbexpr.setQBExpr1(qbexpr1);
 
       // query 2
       assert (ast.getChild(1) != null);
-      QBExpr qbexpr2 = new QBExpr(alias + SUBQUERY_TAG_2);
-      doPhase1QBExpr((ASTNode) ast.getChild(1), qbexpr2, id + SUBQUERY_TAG_2,
-          alias + SUBQUERY_TAG_2);
+      QBExpr qbexpr2 = new QBExpr(alias + "-subquery2");
+      doPhase1QBExpr((ASTNode) ast.getChild(1), qbexpr2, id + "-subquery2",
+          alias + "-subquery2");
       qbexpr.setQBExpr2(qbexpr2);
     }
       break;

http://git-wip-us.apache.org/repos/asf/hive/blob/bf9146c4/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java
index 90eeebd..24226bd 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java
@@ -53,7 +53,6 @@ import org.apache.hadoop.hive.ql.metadata.HiveStorageHandler;
 import org.apache.hadoop.hive.ql.metadata.HiveUtils;
 import org.apache.hadoop.hive.ql.metadata.Table;
 import org.apache.hadoop.hive.ql.parse.ParseContext;
-import org.apache.hadoop.hive.ql.parse.SemanticAnalyzer;
 import org.apache.hadoop.hive.ql.parse.SemanticException;
 import org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory;
 import org.apache.hadoop.hive.ql.session.SessionState;
@@ -976,9 +975,6 @@ public final class PlanUtils {
     // T's parent would be V1
     for (int pos = 0; pos < aliases.length; pos++) {
       currentAlias = currentAlias == null ? aliases[pos] : currentAlias + ":" + aliases[pos];
-
-      currentAlias = currentAlias.replace(SemanticAnalyzer.SUBQUERY_TAG_1, "")
-          .replace(SemanticAnalyzer.SUBQUERY_TAG_2, "");
       ReadEntity input = viewAliasToInput.get(currentAlias);
       if (input == null) {
         return currentInput;


Mime
View raw message