public final class CorrelationUtilities
extends java.lang.Object
| Constructor and Description |
|---|
CorrelationUtilities() |
| Modifier and Type | Method and Description |
|---|---|
protected static <T extends Operator<?>> |
findParents(JoinOperator join,
java.lang.Class<T> target) |
protected static <T extends Operator<?>> |
findPossibleParent(Operator<?> start,
java.lang.Class<T> target,
boolean trustScript) |
protected static <T extends Operator<?>> |
findPossibleParents(Operator<?> start,
java.lang.Class<T> target,
boolean trustScript) |
static java.util.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 java.util.List<ReduceSinkOperator> |
findSiblingReduceSinkOperators(ReduceSinkOperator op)
Find all sibling ReduceSinkOperators (which have the same child operator of op) of op (op
included).
|
protected static TableScanOperator |
findTableScanOperator(Operator<? extends OperatorDesc> startPoint)
Search the query plan tree from startPoint to the bottom.
|
protected static java.lang.String |
getColumnName(java.util.Map<java.lang.String,ExprNodeDesc> opColumnExprMap,
ExprNodeDesc expr) |
protected static Operator<?> |
getSingleChild(Operator<?> operator) |
protected static Operator<?> |
getSingleChild(Operator<?> operator,
boolean throwException) |
protected static <T> T |
getSingleChild(Operator<?> operator,
java.lang.Class<T> type) |
protected static Operator<?> |
getSingleParent(Operator<?> operator) |
protected static Operator<?> |
getSingleParent(Operator<?> operator,
boolean throwException) |
protected static <T> T |
getSingleParent(Operator<?> operator,
java.lang.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,
java.util.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 java.io.Serializable> |
putOpInsertMap(Operator<?> op,
RowResolver rr,
ParseContext context) |
protected static void |
removeOperator(Operator<?> target,
Operator<?> child,
Operator<?> parent,
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) |
protected static boolean isExisted(ExprNodeDesc expr, java.util.List<ExprNodeDesc> columns)
protected static java.lang.String getColumnName(java.util.Map<java.lang.String,ExprNodeDesc> opColumnExprMap, ExprNodeDesc expr)
protected static boolean hasGroupingSet(ReduceSinkOperator cRS) throws SemanticException
SemanticExceptionprotected static Operator<?> getSingleParent(Operator<?> operator, boolean throwException) throws SemanticException
operator - the input operatorthrowException - if throw a exception when the input operator has multiple parentsHiveExceptionSemanticExceptionprotected static Operator<?> getSingleParent(Operator<?> operator) throws SemanticException
SemanticExceptionprotected static Operator<?> getSingleChild(Operator<?> operator, boolean throwException) throws SemanticException
operator - the input operatorthrowException - if throw a exception when the input operator has multiple childrenHiveExceptionSemanticExceptionprotected static Operator<?> getSingleChild(Operator<?> operator) throws SemanticException
SemanticExceptionprotected static <T> T getSingleChild(Operator<?> operator, java.lang.Class<T> type) throws SemanticException
SemanticExceptionprotected static <T> T getSingleParent(Operator<?> operator, java.lang.Class<T> type) throws SemanticException
SemanticExceptionprotected 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
SemanticExceptionprotected static <T extends Operator<?>> T findPossibleParent(Operator<?> start, java.lang.Class<T> target, boolean trustScript) throws SemanticException
SemanticExceptionprotected static <T extends Operator<?>> T[] findPossibleParents(Operator<?> start, java.lang.Class<T> target, boolean trustScript) throws SemanticException
SemanticExceptionprotected static <T extends Operator<?>> T[] findParents(JoinOperator join, java.lang.Class<T> target) throws SemanticException
SemanticExceptionprotected static TableScanOperator findTableScanOperator(Operator<? extends OperatorDesc> startPoint)
startPoint - the operator which the search will start atpublic static java.util.List<ReduceSinkOperator> findSiblingReduceSinkOperators(ReduceSinkOperator op) throws SemanticException
SemanticExceptionpublic static java.util.List<Operator<? extends OperatorDesc>> findSiblingOperators(Operator<? extends OperatorDesc> op) throws SemanticException
SemanticExceptionprotected static SelectOperator replaceReduceSinkWithSelectOperator(ReduceSinkOperator childRS, ParseContext context, org.apache.hadoop.hive.ql.optimizer.correlation.AbstractCorrelationProcCtx procCtx) throws SemanticException
SemanticExceptionprotected static SelectOperator replaceOperatorWithSelect(Operator<?> operator, ParseContext context, org.apache.hadoop.hive.ql.optimizer.correlation.AbstractCorrelationProcCtx procCtx) throws SemanticException
SemanticExceptionprotected static void removeReduceSinkForGroupBy(ReduceSinkOperator cRS, GroupByOperator cGBYr, ParseContext context, org.apache.hadoop.hive.ql.optimizer.correlation.AbstractCorrelationProcCtx procCtx) throws SemanticException
SemanticExceptionprotected static void isNullOperator(Operator<?> operator) throws SemanticException
operator - HiveExceptionSemanticExceptionprotected static void insertOperatorBetween(Operator<?> newOperator, Operator<?> parent, Operator<?> child) throws SemanticException
newOperator - the operator will be inserted between child and parentchild - parent - context - HiveExceptionSemanticExceptionprotected static void removeOperator(Operator<?> target, Operator<?> child, Operator<?> parent, ParseContext context)
protected static Operator<? extends java.io.Serializable> putOpInsertMap(Operator<?> op, RowResolver rr, ParseContext context)
Copyright © 2012 The Apache Software Foundation