Interface Expr.InputBindingInspector

All Known Subinterfaces:
ApplyFunction.IndexableFoldLambdaBinding, ApplyFunction.IndexableMapLambdaObjectBinding, ColumnIndexSelector, ColumnInspector, ColumnSelector, ColumnSelectorFactory, CursorFactory, Expr.ObjectBinding, Expr.VectorInputBinding, Expr.VectorInputBindingInspector, IncrementalIndexRowSelector, PhysicalSegmentInspector, QueryableIndex, VectorColumnSelectorFactory
All Known Implementing Classes:
AllNullColumnSelectorFactory, ApplyFunction.CartesianFoldLambdaBinding, ApplyFunction.CartesianMapLambdaBinding, ApplyFunction.FoldLambdaBinding, ApplyFunction.LambdaInputBindingInspector, ApplyFunction.MapLambdaBinding, ApplyFunction.SettableLambdaBinding, ColumnarFrameCursorFactory, ColumnCache, DefaultColumnSelectorFactoryMaker.ColumnAccessorBasedColumnSelectorFactory, ExpressionLambdaAggregatorInputBindings, ExpressionVectorInputBinding, FilteredCursorFactory, FilteredVectorInputBinding, FrameColumnSelectorFactory, FrameQueryableIndex, HashJoinSegmentCursorFactory, IncrementalIndex, IncrementalIndexCursorFactory, IncrementalIndexPhysicalSegmentInspector, IndexedTableColumnSelectorFactory, InputBindings.BestEffortInputBindings, LookupColumnSelectorFactory, MultiColumnSelectorFactory, NoopQueryableIndex, OnHeapAggregateProjection, OnheapIncrementalIndex, QueryableIndexColumnSelectorFactory, QueryableIndexCursorFactory, QueryableIndexPhysicalSegmentInspector, QueryableIndexVectorColumnSelectorFactory, RemapColumnSelectorFactory, RemapVectorColumnSelectorFactory, RestrictedCursorFactory, RowBasedColumnSelectorFactory, RowBasedCursorFactory, RowFrameCursorFactory, RowSignature, SettableCursorColumnSelectorFactory, SettableObjectBinding, ShimColumnSelectorFactory, SimpleQueryableIndex, SingleInputBindings, UnnestCursorFactory, VirtualizedColumnInspector, VirtualizedColumnSelectorFactory
Enclosing interface:
Expr

public static interface Expr.InputBindingInspector
Mechanism to supply input types for the bindings which will back IdentifierExpr, to use in the aid of inferring the output type of an expression with Expr.getOutputType(org.apache.druid.math.expr.Expr.InputBindingInspector). A null value means that either the binding doesn't exist, or, that the type information is unavailable.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Check if all provided Expr can infer the output type as TypeSignature.isNumeric() with a value of true (or null, which is not a type) There must be at least one expression with a computable numeric output type for this method to return true.
    default boolean
    areNumeric(Expr... args)
    Check if all provided Expr can infer the output type as TypeSignature.isNumeric() with a value of true (or null, which is not a type) There must be at least one expression with a computable numeric output type for this method to return true.
    default boolean
    Check if all arguments are the same type (or null, which is not a type) This method should only be used if getType(java.lang.String) produces accurate information for all bindings (no null value for type unless the input binding does not exist and so the input is always null)
    default boolean
    areSameTypes(Expr... args)
    Check if all arguments are the same type (or null, which is not a type) This method should only be used if getType(java.lang.String) produces accurate information for all bindings (no null value for type unless the input binding does not exist and so the input is always null)
    default boolean
    Check if all provided Expr can infer the output type as TypeSignature.isPrimitive() (non-array) with a value of true (or null, which is not a type) There must be at least one expression with a computable scalar output type for this method to return true.
    default boolean
    areScalar(Expr... args)
    Check if all provided Expr can infer the output type as TypeSignature.isPrimitive() (non-array) with a value of true (or null, which is not a type) There must be at least one expression with a computable scalar output type for this method to return true.
    default boolean
    Check if every provided Expr computes Expr.canVectorize(InputBindingInspector) to a value of true
    default boolean
    canVectorize(Expr... args)
    Check if every provided Expr computes Expr.canVectorize(InputBindingInspector) to a value of true
    Get the ExpressionType from the backing store for a given identifier (this is likely a column, but could be other things depending on the backing adapter)
  • Method Details

    • getType

      @Nullable ExpressionType getType(String name)
      Get the ExpressionType from the backing store for a given identifier (this is likely a column, but could be other things depending on the backing adapter)
    • areNumeric

      default boolean areNumeric(List<Expr> args)
      Check if all provided Expr can infer the output type as TypeSignature.isNumeric() with a value of true (or null, which is not a type) There must be at least one expression with a computable numeric output type for this method to return true. This method should only be used if getType(java.lang.String) produces accurate information for all bindings (no null value for type unless the input binding does not exist and so the input is always null)
      See Also:
    • areNumeric

      default boolean areNumeric(Expr... args)
      Check if all provided Expr can infer the output type as TypeSignature.isNumeric() with a value of true (or null, which is not a type) There must be at least one expression with a computable numeric output type for this method to return true. This method should only be used if getType(java.lang.String) produces accurate information for all bindings (no null value for type unless the input binding does not exist and so the input is always null)
      See Also:
    • areSameTypes

      default boolean areSameTypes(List<Expr> args)
      Check if all arguments are the same type (or null, which is not a type) This method should only be used if getType(java.lang.String) produces accurate information for all bindings (no null value for type unless the input binding does not exist and so the input is always null)
      See Also:
    • areSameTypes

      default boolean areSameTypes(Expr... args)
      Check if all arguments are the same type (or null, which is not a type) This method should only be used if getType(java.lang.String) produces accurate information for all bindings (no null value for type unless the input binding does not exist and so the input is always null)
      See Also:
    • areScalar

      default boolean areScalar(List<Expr> args)
      Check if all provided Expr can infer the output type as TypeSignature.isPrimitive() (non-array) with a value of true (or null, which is not a type) There must be at least one expression with a computable scalar output type for this method to return true. This method should only be used if getType(java.lang.String) produces accurate information for all bindings (no null value for type unless the input binding does not exist and so the input is always null)
      See Also:
    • areScalar

      default boolean areScalar(Expr... args)
      Check if all provided Expr can infer the output type as TypeSignature.isPrimitive() (non-array) with a value of true (or null, which is not a type) There must be at least one expression with a computable scalar output type for this method to return true. This method should only be used if getType(java.lang.String) produces accurate information for all bindings (no null value for type unless the input binding does not exist and so the input is always null)
      See Also:
    • canVectorize

      default boolean canVectorize(List<Expr> args)
      Check if every provided Expr computes Expr.canVectorize(InputBindingInspector) to a value of true
    • canVectorize

      default boolean canVectorize(Expr... args)
      Check if every provided Expr computes Expr.canVectorize(InputBindingInspector) to a value of true