public class ExprNodeDescUtils
extends java.lang.Object
Constructor and Description |
---|
ExprNodeDescUtils() |
Modifier and Type | Method and Description |
---|---|
static ExprNodeDesc |
backtrack(ExprNodeDesc source,
Operator<?> current,
Operator<?> terminal) |
static java.util.ArrayList<ExprNodeDesc> |
backtrack(java.util.List<ExprNodeDesc> sources,
Operator<?> current,
Operator<?> terminal)
Convert expressions in current operator to those in terminal operator, which
is an ancestor of current or null (back to top operator).
|
static boolean |
containsPredicate(ExprNodeDesc source,
ExprNodeDesc predicate)
return true if predicate is already included in source
|
static Operator<?> |
getSingleParent(Operator<?> current,
Operator<?> terminal) |
static int |
indexOf(ExprNodeDesc origin,
java.util.List<ExprNodeDesc> sources) |
static boolean |
isDeterministic(ExprNodeDesc desc)
Return false if the expression has any non determinitic function
|
static ExprNodeDesc |
mergePredicates(ExprNodeDesc prev,
ExprNodeDesc next)
bind two predicates by AND op
|
static ExprNodeDesc |
mergePredicates(java.util.List<ExprNodeDesc> exprs)
bind n predicates by AND op
|
static java.lang.String |
recommendInputName(ExprNodeDesc desc)
Recommend name for the expression
|
static ExprNodeDesc |
replace(ExprNodeDesc origin,
java.util.List<ExprNodeDesc> sources,
java.util.List<ExprNodeDesc> targets) |
static java.util.List<ExprNodeDesc> |
split(ExprNodeDesc current)
split predicates by AND op
|
static java.util.List<ExprNodeDesc> |
split(ExprNodeDesc current,
java.util.List<ExprNodeDesc> splitted)
split predicates by AND op
|
public static int indexOf(ExprNodeDesc origin, java.util.List<ExprNodeDesc> sources)
public static ExprNodeDesc replace(ExprNodeDesc origin, java.util.List<ExprNodeDesc> sources, java.util.List<ExprNodeDesc> targets)
public static boolean containsPredicate(ExprNodeDesc source, ExprNodeDesc predicate)
public static ExprNodeDesc mergePredicates(ExprNodeDesc prev, ExprNodeDesc next)
public static ExprNodeDesc mergePredicates(java.util.List<ExprNodeDesc> exprs)
public static java.util.List<ExprNodeDesc> split(ExprNodeDesc current)
public static java.util.List<ExprNodeDesc> split(ExprNodeDesc current, java.util.List<ExprNodeDesc> splitted)
public static java.lang.String recommendInputName(ExprNodeDesc desc)
public static boolean isDeterministic(ExprNodeDesc desc)
public static java.util.ArrayList<ExprNodeDesc> backtrack(java.util.List<ExprNodeDesc> sources, Operator<?> current, Operator<?> terminal) throws SemanticException
SemanticException
public static ExprNodeDesc backtrack(ExprNodeDesc source, Operator<?> current, Operator<?> terminal) throws SemanticException
SemanticException
public static Operator<?> getSingleParent(Operator<?> current, Operator<?> terminal) throws SemanticException
SemanticException
Copyright © 2012 The Apache Software Foundation