Class ListSubfieldEncoder

java.lang.Object
org.apache.arrow.vector.dictionary.ListSubfieldEncoder

public class ListSubfieldEncoder extends Object
Sub fields encoder/decoder for Dictionary encoded BaseListVector.
  • Constructor Details

  • Method Details

    • encodeListSubField

      public BaseListVector encodeListSubField(BaseListVector vector)
      Dictionary encodes subfields for complex vector with a provided dictionary. The dictionary must contain all values in the sub fields vector.
      Parameters:
      vector - vector to encode
      Returns:
      dictionary encoded vector
    • decodeListSubField

      public BaseListVector decodeListSubField(BaseListVector vector)
      Decodes a dictionary subfields encoded vector using the provided dictionary. decodeListSubField(BaseListVector, Dictionary, BufferAllocator) should be used instead if only decoding is required as it can avoid building the DictionaryHashTable which only makes sense when encoding.
      Parameters:
      vector - dictionary encoded vector, its data vector must be int type
      Returns:
      vector with values restored from dictionary
    • decodeListSubField

      public static BaseListVector decodeListSubField(BaseListVector vector, Dictionary dictionary, BufferAllocator allocator)
      Decodes a dictionary subfields encoded vector using the provided dictionary.
      Parameters:
      vector - dictionary encoded vector, its data vector must be int type
      dictionary - dictionary used to decode the values
      allocator - allocator the decoded values use
      Returns:
      vector with values restored from dictionary