You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by pg...@apache.org on 2022/01/20 11:29:38 UTC
[hive] branch master updated: HIVE-25828: Remove unused import and method in ParseUtils (#2900)
This is an automated email from the ASF dual-hosted git repository.
pgaref pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 9876ec8 HIVE-25828: Remove unused import and method in ParseUtils (#2900)
9876ec8 is described below
commit 9876ec81873e8305ba228343735e91a963b86a85
Author: butaozhang <97...@users.noreply.github.com>
AuthorDate: Thu Jan 20 19:29:16 2022 +0800
HIVE-25828: Remove unused import and method in ParseUtils (#2900)
---
.../apache/hadoop/hive/ql/parse/ParseUtils.java | 45 ----------------------
1 file changed, 45 deletions(-)
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/ParseUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/ParseUtils.java
index e7c15ff..5aae2ea 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/ParseUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/ParseUtils.java
@@ -20,7 +20,6 @@ package org.apache.hadoop.hive.ql.parse;
import com.google.common.base.Preconditions;
-import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayDeque;
@@ -32,7 +31,6 @@ import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
-import java.util.Stack;
import com.google.common.collect.Lists;
import org.antlr.runtime.tree.CommonTree;
@@ -55,10 +53,8 @@ import org.apache.hadoop.hive.ql.optimizer.calcite.translator.ASTBuilder;
import org.apache.hadoop.hive.ql.parse.CalcitePlanner.ASTSearcher;
import org.apache.hadoop.hive.ql.parse.type.ExprNodeTypeCheck;
import org.apache.hadoop.hive.ql.parse.type.TypeCheckCtx;
-import org.apache.hadoop.hive.ql.parse.type.TypeCheckProcFactory;
import org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc;
import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc;
-import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
import org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDF;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters;
@@ -312,47 +308,6 @@ public final class ParseUtils {
return false;
}
- public static boolean sameTree(ASTNode node, ASTNode otherNode) {
- if (node == null && otherNode == null) {
- return true;
- }
- if ((node == null && otherNode != null) ||
- (node != null && otherNode == null)) {
- return false;
- }
-
- Stack<Tree> stack = new Stack<Tree>();
- stack.push(node);
- Stack<Tree> otherStack = new Stack<Tree>();
- otherStack.push(otherNode);
-
- while (!stack.empty() && !otherStack.empty()) {
- Tree p = stack.pop();
- Tree otherP = otherStack.pop();
-
- if (p.isNil() != otherP.isNil()) {
- return false;
- }
- if (!p.isNil()) {
- if (!p.toString().equals(otherP.toString())) {
- return false;
- }
- }
- if (p.getChildCount() != otherP.getChildCount()) {
- return false;
- }
- for (int i = p.getChildCount()-1; i >= 0; i--) {
- Tree t = p.getChild(i);
- stack.push(t);
- Tree otherT = otherP.getChild(i);
- otherStack.push(otherT);
- }
- }
-
- return stack.empty() && otherStack.empty();
- }
-
-
private static void handleSetColRefs(ASTNode tree, Context ctx) {
CalcitePlanner.ASTSearcher astSearcher = new CalcitePlanner.ASTSearcher();
while (true) {