Record Class ArrowToEsql

java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasource.grpc.ArrowToEsql
Record Components:
dataType - the logical type, used to convert the Arrow schema to ES|QL attributes
elementType - the primitive type used to represent Arrow vector values
converter - block converter: to create an ES|QL block from an Arrow vector

public record ArrowToEsql(DataType dataType, ElementType elementType, ArrowToBlockConverter converter) extends Record
Mapping information from Arrow vectors to an ES|QL blocks.
  • Constructor Details

    • ArrowToEsql

      public ArrowToEsql(DataType dataType, ElementType elementType, ArrowToBlockConverter converter)
      Creates an instance of a ArrowToEsql record class.
      Parameters:
      dataType - the value for the dataType record component
      elementType - the value for the elementType record component
      converter - the value for the converter record component
  • Method Details

    • forType

      public static ArrowToEsql forType(org.apache.arrow.vector.types.Types.MinorType minorType)
    • forField

      public static ArrowToEsql forField(org.apache.arrow.vector.types.pojo.Field field)
    • convert

      public Block convert(org.apache.arrow.vector.FieldVector vector, BlockFactory blockFactory)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • dataType

      public DataType dataType()
      Returns the value of the dataType record component.
      Returns:
      the value of the dataType record component
    • elementType

      public ElementType elementType()
      Returns the value of the elementType record component.
      Returns:
      the value of the elementType record component
    • converter

      public ArrowToBlockConverter converter()
      Returns the value of the converter record component.
      Returns:
      the value of the converter record component