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

public abstract class FunctionHolderExpression extends LogicalExpressionBase
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.
  • Field Details

    • args

      public final org.apache.drill.shaded.guava.com.google.common.collect.ImmutableList<LogicalExpression> args
    • nameUsed

      public final String nameUsed
  • Constructor Details

  • Method Details

    • accept

      public <T, V, E extends Exception> T accept(ExprVisitor<T,V,E> visitor, V value) throws E
      Throws:
      E extends Exception
    • getName

      public String 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

      public abstract FunctionHolderExpression copy(List<LogicalExpression> args)
      Returns:
      a copy of FunctionHolderExpression, with passed in argument list.
    • getHolder

      public abstract FuncHolder getHolder()
      Return the underlying function implementation holder. That is, returns the function declaration.
    • getFieldReference

      public FieldReference getFieldReference()
    • setFieldReference

      public void setFieldReference(FieldReference fieldReference)
      Set the FieldReference to be used during generating code.
      Parameters:
      fieldReference - FieldReference to set.
    • toString

      public String toString()
      Overrides:
      toString in class Object