|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hive.ql.optimizer.correlation.CorrelationUtilities
public final class CorrelationUtilities
Utilities for both CorrelationOptimizer and ReduceSinkDeDuplication.
| Constructor Summary | |
|---|---|
CorrelationUtilities()
|
|
| Method Summary | ||
|---|---|---|
protected static
|
findParents(JoinOperator join,
Class<T> target)
|
|
protected static
|
findPossibleParent(Operator<?> start,
Class<T> target,
boolean trustScript)
|
|
protected static
|
findPossibleParents(Operator<?> start,
Class<T> target,
boolean trustScript)
|
|
static List<Operator<? extends OperatorDesc>> |
findSiblingOperators(Operator<? extends OperatorDesc> op)
Find all sibling operators (which have the same child operator of op) of op (op included). |
|
static List<ReduceSinkOperator> |
findSiblingReduceSinkOperators(ReduceSinkOperator op)
Find all sibling ReduceSinkOperators (which have the same child operator of op) of op (op included). |
|
protected static Set<TableScanOperator> |
findTableScanOperators(Operator<?> startPoint)
Search the query plan tree from startPoint to the bottom. |
|
protected static String |
getColumnName(Map<String,ExprNodeDesc> opColumnExprMap,
ExprNodeDesc expr)
|
|
protected static Operator<?> |
getSingleChild(Operator<?> operator)
|
|
protected static Operator<?> |
getSingleChild(Operator<?> operator,
boolean throwException)
|
|
protected static
|
getSingleChild(Operator<?> operator,
Class<T> type)
|
|
protected static Operator<?> |
getSingleParent(Operator<?> operator)
|
|
protected static Operator<?> |
getSingleParent(Operator<?> operator,
boolean throwException)
|
|
protected static
|
getSingleParent(Operator<?> operator,
Class<T> type)
|
|
protected static boolean[] |
getSortedTags(JoinOperator joinOp)
|
|
protected static Operator<?> |
getStartForGroupBy(ReduceSinkOperator cRS)
|
|
protected static boolean |
hasGroupingSet(ReduceSinkOperator cRS)
|
|
protected static int |
indexOf(ExprNodeDesc cexpr,
ExprNodeDesc[] pexprs,
Operator child,
Operator[] parents,
boolean[] sorted)
|
|
protected static void |
insertOperatorBetween(Operator<?> newOperator,
Operator<?> parent,
Operator<?> child)
|
|
protected static boolean |
isExisted(ExprNodeDesc expr,
List<ExprNodeDesc> columns)
|
|
protected static void |
isNullOperator(Operator<?> operator)
throw a exception if the input operator is null |
|
protected static boolean |
isSortedTag(JoinOperator joinOp,
int tag)
|
|
protected static Operator<? extends Serializable> |
putOpInsertMap(Operator<?> op,
RowResolver rr,
ParseContext context)
|
|
protected static void |
removeOperator(Operator<?> target,
Operator<?> child,
Operator<?> parent,
ParseContext context)
|
|
static void |
removeOperator(Operator<?> target,
ParseContext context)
|
|
protected static void |
removeReduceSinkForGroupBy(ReduceSinkOperator cRS,
GroupByOperator cGBYr,
ParseContext context,
org.apache.hadoop.hive.ql.optimizer.correlation.AbstractCorrelationProcCtx procCtx)
|
|
protected static SelectOperator |
replaceOperatorWithSelect(Operator<?> operator,
ParseContext context,
org.apache.hadoop.hive.ql.optimizer.correlation.AbstractCorrelationProcCtx procCtx)
|
|
protected static SelectOperator |
replaceReduceSinkWithSelectOperator(ReduceSinkOperator childRS,
ParseContext context,
org.apache.hadoop.hive.ql.optimizer.correlation.AbstractCorrelationProcCtx procCtx)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CorrelationUtilities()
| Method Detail |
|---|
protected static boolean isExisted(ExprNodeDesc expr,
List<ExprNodeDesc> columns)
protected static String getColumnName(Map<String,ExprNodeDesc> opColumnExprMap,
ExprNodeDesc expr)
protected static boolean hasGroupingSet(ReduceSinkOperator cRS)
throws SemanticException
SemanticException
protected static Operator<?> getSingleParent(Operator<?> operator,
boolean throwException)
throws SemanticException
operator - the input operatorthrowException - if throw a exception when the input operator has multiple parents
HiveException
SemanticException
protected static Operator<?> getSingleParent(Operator<?> operator)
throws SemanticException
SemanticException
protected static Operator<?> getSingleChild(Operator<?> operator,
boolean throwException)
throws SemanticException
operator - the input operatorthrowException - if throw a exception when the input operator has multiple children
HiveException
SemanticException
protected static Operator<?> getSingleChild(Operator<?> operator)
throws SemanticException
SemanticException
protected static <T> T getSingleChild(Operator<?> operator,
Class<T> type)
throws SemanticException
SemanticException
protected static <T> T getSingleParent(Operator<?> operator,
Class<T> type)
throws SemanticException
SemanticException
protected static Operator<?> getStartForGroupBy(ReduceSinkOperator cRS)
throws SemanticException
SemanticExceptionprotected static boolean[] getSortedTags(JoinOperator joinOp)
protected static boolean isSortedTag(JoinOperator joinOp,
int tag)
protected static int indexOf(ExprNodeDesc cexpr,
ExprNodeDesc[] pexprs,
Operator child,
Operator[] parents,
boolean[] sorted)
throws SemanticException
SemanticException
protected static <T extends Operator<?>> T findPossibleParent(Operator<?> start,
Class<T> target,
boolean trustScript)
throws SemanticException
SemanticException
protected static <T extends Operator<?>> T[] findPossibleParents(Operator<?> start,
Class<T> target,
boolean trustScript)
throws SemanticException
SemanticException
protected static <T extends Operator<?>> T[] findParents(JoinOperator join,
Class<T> target)
throws SemanticException
SemanticExceptionprotected static Set<TableScanOperator> findTableScanOperators(Operator<?> startPoint)
startPoint - the operator which the search will start at
public static List<ReduceSinkOperator> findSiblingReduceSinkOperators(ReduceSinkOperator op)
throws SemanticException
SemanticException
public static List<Operator<? extends OperatorDesc>> findSiblingOperators(Operator<? extends OperatorDesc> op)
throws SemanticException
SemanticException
protected static SelectOperator replaceReduceSinkWithSelectOperator(ReduceSinkOperator childRS,
ParseContext context,
org.apache.hadoop.hive.ql.optimizer.correlation.AbstractCorrelationProcCtx procCtx)
throws SemanticException
SemanticException
protected static SelectOperator replaceOperatorWithSelect(Operator<?> operator,
ParseContext context,
org.apache.hadoop.hive.ql.optimizer.correlation.AbstractCorrelationProcCtx procCtx)
throws SemanticException
SemanticException
protected static void removeReduceSinkForGroupBy(ReduceSinkOperator cRS,
GroupByOperator cGBYr,
ParseContext context,
org.apache.hadoop.hive.ql.optimizer.correlation.AbstractCorrelationProcCtx procCtx)
throws SemanticException
SemanticException
protected static void isNullOperator(Operator<?> operator)
throws SemanticException
operator -
HiveException
SemanticException
protected static void insertOperatorBetween(Operator<?> newOperator,
Operator<?> parent,
Operator<?> child)
throws SemanticException
newOperator - the operator will be inserted between child and parentchild - parent - context -
HiveException
SemanticException
public static void removeOperator(Operator<?> target,
ParseContext context)
protected static void removeOperator(Operator<?> target,
Operator<?> child,
Operator<?> parent,
ParseContext context)
protected static Operator<? extends Serializable> putOpInsertMap(Operator<?> op,
RowResolver rr,
ParseContext context)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||