public class EvalTreeUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
EvalTreeUtil.AllAggFunctionFinder |
static class |
EvalTreeUtil.AllColumnRefFinder |
static class |
EvalTreeUtil.AllWindowFunctionFinder |
static class |
EvalTreeUtil.ChangeColumnRefVisitor |
static class |
EvalTreeUtil.EvalFinder |
static class |
EvalTreeUtil.EvalReplaceVisitor |
static class |
EvalTreeUtil.OuterJoinSensitiveEvalFinder |
static class |
EvalTreeUtil.UniqueColumnFinder |
static class |
EvalTreeUtil.VariableCounter |
| Constructor and Description |
|---|
EvalTreeUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
changeColumnRef(EvalNode node,
String oldName,
String newName) |
static boolean |
checkIfCanBeConstant(EvalNode evalNode) |
static String |
columnsToStr(Collection<Column> columns) |
static boolean |
containColumnRef(EvalNode expr,
Column target)
Examine if the expr contains the column reference corresponding
to the target column
|
static Datum |
evaluateImmediately(EvalNode evalNode) |
static List<Column> |
findAllColumnRefs(EvalNode node) |
static Set<AggregationFunctionCallEval> |
findDistinctAggFunction(EvalNode expr) |
static <T extends EvalNode> |
findEvalsByType(EvalNode evalNode,
EvalType type) |
static <T extends EvalNode> |
findOuterJoinSensitiveEvals(EvalNode evalNode) |
static LinkedHashSet<Column> |
findUniqueColumns(EvalNode node)
It finds unique columns from a EvalNode.
|
static Set<WindowFunctionEval> |
findWindowFunction(EvalNode expr) |
static Collection<EvalNode> |
getContainExpr(EvalNode expr,
Column target)
Return all exprs to refer columns corresponding to the target.
|
static TajoDataTypes.DataType |
getDomainByExpr(Schema inputSchema,
EvalNode expr) |
static Map<EvalType,Integer> |
getExprCounters(EvalNode expr)
Return the counter to count the number of expression types individually.
|
static Schema |
getSchemaByTargets(Schema inputSchema,
Target[] targets) |
static boolean |
isJoinQual(EvalNode expr,
boolean includeThetaJoin)
If a given expression is join condition, it returns TRUE.
|
static boolean |
isJoinQual(LogicalPlan.QueryBlock block,
Schema leftSchema,
Schema rightSchema,
EvalNode expr,
boolean includeThetaJoin)
If a given expression is join condition, it returns TRUE.
|
static int |
replace(EvalNode expr,
EvalNode targetExpr,
EvalNode tobeReplaced) |
public static LinkedHashSet<Column> findUniqueColumns(EvalNode node)
public static Schema getSchemaByTargets(Schema inputSchema, Target[] targets) throws InternalException
InternalExceptionpublic static String columnsToStr(Collection<Column> columns)
public static TajoDataTypes.DataType getDomainByExpr(Schema inputSchema, EvalNode expr) throws InternalException
InternalExceptionpublic static Collection<EvalNode> getContainExpr(EvalNode expr, Column target)
expr - target - to be foundpublic static Map<EvalType,Integer> getExprCounters(EvalNode expr)
expr - public static boolean containColumnRef(EvalNode expr, Column target)
public static boolean isJoinQual(EvalNode expr, boolean includeThetaJoin)
expr - EvalNode to be evaluatedincludeThetaJoin - If true, it will return equi as well as non-equi join conditions.
Otherwise, it only returns equi-join conditions.public static boolean isJoinQual(@Nullable LogicalPlan.QueryBlock block, @Nullable Schema leftSchema, @Nullable Schema rightSchema, EvalNode expr, boolean includeThetaJoin)
block - if block is not null, it tracks the lineage of aliased name derived from complex expressions.leftSchema - Schema to be used to check if columns belong to different relationsrightSchema - Schema to be used to check if columns belong to different relationsexpr - EvalNode to be evaluatedincludeThetaJoin - If true, it will return equi as well as non-equi join conditions.
Otherwise, it only returns equi-join conditions.public static Set<AggregationFunctionCallEval> findDistinctAggFunction(EvalNode expr)
public static Set<WindowFunctionEval> findWindowFunction(EvalNode expr)
public static <T extends EvalNode> Collection<T> findEvalsByType(EvalNode evalNode, EvalType type)
public static <T extends EvalNode> Collection<T> findOuterJoinSensitiveEvals(EvalNode evalNode)
public static boolean checkIfCanBeConstant(EvalNode evalNode)
Copyright © 2015 Apache Software Foundation. All Rights Reserved.