Class FunctionHolderExpression
java.lang.Object
org.apache.drill.common.expression.LogicalExpressionBase
org.apache.drill.common.expression.FunctionHolderExpression
- All Implemented Interfaces:
Iterable<LogicalExpression>,LogicalExpression
- Direct Known Subclasses:
DrillFuncHolderExpr,HiveFuncHolderExpr
Represents an actual call (a reference) to a declared function.
Holds the name used (functions can have multiple aliases), the
function declaration, and the actual argument expressions used
in this call. This might be better named
FunctionCallExpression as it represents a use
of a function. Subclasses hold references to the declaration
depending on the type (Drill, Hive) of the function.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.common.expression.LogicalExpression
LogicalExpression.De, LogicalExpression.Se -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal com.google.common.collect.ImmutableList<LogicalExpression> final String -
Constructor Summary
ConstructorsConstructorDescriptionFunctionHolderExpression(String nameUsed, ExpressionPosition pos, List<LogicalExpression> args) -
Method Summary
Modifier and TypeMethodDescription<T,V, E extends Exception>
Taccept(ExprVisitor<T, V, E> visitor, V value) abstract booleanargConstantOnly(int i) constant input expected for i'th argument?abstract FunctionHolderExpressioncopy(List<LogicalExpression> args) abstract FuncHolderReturn the underlying function implementation holder.getName()A function can have multiple names, it returns the function name used in the query.abstract booleanabstract booleanisRandom()Is the function output non-deterministic?voidsetFieldReference(FieldReference fieldReference) Set the FieldReference to be used during generating code.toString()Methods inherited from class org.apache.drill.common.expression.LogicalExpressionBase
getCumulativeCost, getDescription, getMajorType, getPosition, getSelfCost, iMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Field Details
-
args
-
nameUsed
-
-
Constructor Details
-
FunctionHolderExpression
public FunctionHolderExpression(String nameUsed, ExpressionPosition pos, List<LogicalExpression> args)
-
-
Method Details
-
accept
- Throws:
E
-
getName
A function can have multiple names, it returns the function name used in the query.- Returns:
- The function name used in the query.
-
argConstantOnly
public abstract boolean argConstantOnly(int i) constant input expected for i'th argument?- Parameters:
i-- Returns:
- True if a constant input is expected for the i'th argument. False otherwise.
-
isAggregating
public abstract boolean isAggregating()- Returns:
- aggregating function or not
-
isRandom
public abstract boolean isRandom()Is the function output non-deterministic? -
copy
- Returns:
- a copy of FunctionHolderExpression, with passed in argument list.
-
getHolder
Return the underlying function implementation holder. That is, returns the function declaration. -
getFieldReference
-
setFieldReference
Set the FieldReference to be used during generating code.- Parameters:
fieldReference- FieldReference to set.
-
toString
-