Class Function.MultiValueStringHarmonizeNullsFunction

java.lang.Object
org.apache.druid.math.expr.Function.MultiValueStringHarmonizeNullsFunction
All Implemented Interfaces:
Function, NamedFunction
Enclosing interface:
Function

public static class Function.MultiValueStringHarmonizeNullsFunction extends Object implements Function
Primarily internal helper function used to coerce null, [], and [null] into [null], similar to the logic done by ExpressionSelectors.supplierFromDimensionSelector(org.apache.druid.segment.DimensionSelector, boolean, boolean) when the 3rd argument is true, which is done when implicitly mapping scalar functions over mvd values. Was formerly generated by the SQL layer for MV_CONTAINS and MV_OVERLAP, but is no longer generated, since the SQL layer now prefers using Function.MvContainsFunction and Function.MvOverlapFunction. This function remains here for backwards compatibility.
  • Constructor Details

    • MultiValueStringHarmonizeNullsFunction

      public MultiValueStringHarmonizeNullsFunction()
  • Method Details

    • name

      public String name()
      Description copied from interface: NamedFunction
      Name of the function
      Specified by:
      name in interface NamedFunction
    • apply

      public ExprEval apply(List<Expr> args, Expr.ObjectBinding bindings)
      Description copied from interface: Function
      Evaluate the function, given a list of arguments and a set of bindings to provide values for IdentifierExpr.
      Specified by:
      apply in interface Function
    • validateArguments

      public void validateArguments(List<Expr> args)
      Description copied from interface: Function
      Validate function arguments. This method is called whenever a FunctionExpr is created, and should validate everything that is feasible up front. Note that input type information is typically unavailable at the time Expr are parsed, and so this method is incapable of performing complete validation.
      Specified by:
      validateArguments in interface Function
    • getOutputType

      @Nullable public ExpressionType getOutputType(Expr.InputBindingInspector inspector, List<Expr> args)
      Description copied from interface: Function
      Compute the output type of this function for a given set of argument expression inputs.
      Specified by:
      getOutputType in interface Function
      See Also:
    • hasArrayInputs

      public boolean hasArrayInputs()
      Description copied from interface: Function
      Returns true if a function expects any array arguments
      Specified by:
      hasArrayInputs in interface Function
    • hasArrayOutput

      public boolean hasArrayOutput()
      Description copied from interface: Function
      Returns true if function produces an array. All Function implementations are expected to exclusively produce either scalar or array values.
      Specified by:
      hasArrayOutput in interface Function
    • getScalarInputs

      public Set<Expr> getScalarInputs(List<Expr> args)
      Description copied from interface: Function
      Given a list of arguments to this Function, get the set of arguments that must evaluate to a scalar value
      Specified by:
      getScalarInputs in interface Function
    • getArrayInputs

      public Set<Expr> getArrayInputs(List<Expr> args)
      Description copied from interface: Function
      Given a list of arguments to this Function, get the set of arguments that must evaluate to an array value
      Specified by:
      getArrayInputs in interface Function