Class SpatialDocValuesFunction

All Implemented Interfaces:
NamedWriteable, Writeable, Resolvable, EvaluatorMapper
Direct Known Subclasses:
SpatialGridFunction, SpatialUnaryDocValuesFunction

public abstract class SpatialDocValuesFunction extends EsqlScalarFunction
Spatial functions that can take doc values as an argument can inherit from this class. Examples: StGeohash, StGeotile, StGeohex and StSimplify
  • Field Details

    • spatialDocValues

      protected final boolean spatialDocValues
  • Constructor Details

    • SpatialDocValuesFunction

      protected SpatialDocValuesFunction(Source source, List<Expression> expressions, boolean spatialDocValues)
  • Method Details

    • withDocValues

      public abstract SpatialDocValuesFunction withDocValues(boolean useDocValues)
      Mark the function as expecting the specified field to arrive as doc-values. This only applies to geo_point and cartesian_point types.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Function
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Function
    • foldable

      public boolean foldable()
      Description copied from class: Expression
      Whether the expression can be evaluated statically, aka "folded", or not.
      Overrides:
      foldable in class Expression
    • spatialField

      public abstract Expression spatialField()
    • spatialDocValues

      public boolean spatialDocValues()
    • prefersDocValuesExtraction

      public boolean prefersDocValuesExtraction()
      Indicates that this function prefers to have its spatial argument extracted from doc values. This is a hint to the planner that can be ignored if necessary. If a function does not prefer doc values extraction, it should override this method to return false. Examples of such functions are ST_X and ST_Y that should provide exact values from source. Note that if the original field is not dropped from the output, this request will be ignored.