Class PrimitiveConverter

java.lang.Object
org.apache.parquet.io.api.Converter
org.apache.parquet.io.api.PrimitiveConverter
Direct Known Subclasses:
FilteringPrimitiveConverter

public abstract class PrimitiveConverter extends Converter
converter for leaves of the schema
  • Constructor Details

    • PrimitiveConverter

      public PrimitiveConverter()
  • Method Details

    • isPrimitive

      public boolean isPrimitive()
      Specified by:
      isPrimitive in class Converter
    • asPrimitiveConverter

      public PrimitiveConverter asPrimitiveConverter()
      Overrides:
      asPrimitiveConverter in class Converter
    • hasDictionarySupport

      public boolean hasDictionarySupport()
      if it returns true we will attempt to use dictionary based conversion instead
      Returns:
      if dictionary is supported
    • setDictionary

      public void setDictionary(Dictionary dictionary)
      Set the dictionary to use if the data was encoded using dictionary encoding and the converter hasDictionarySupport().
      Parameters:
      dictionary - the dictionary to use for conversion
    • addValueFromDictionary

      public void addValueFromDictionary(int dictionaryId)
      add a value based on the dictionary set with setDictionary() Will be used if the Converter has dictionary support and the data was encoded using a dictionary
      Parameters:
      dictionaryId - the id in the dictionary of the value to add
    • addBinary

      public void addBinary(Binary value)
      Parameters:
      value - value to set
    • addBoolean

      public void addBoolean(boolean value)
      Parameters:
      value - value to set
    • addDouble

      public void addDouble(double value)
      Parameters:
      value - value to set
    • addFloat

      public void addFloat(float value)
      Parameters:
      value - value to set
    • addInt

      public void addInt(int value)
      Parameters:
      value - value to set
    • addLong

      public void addLong(long value)
      Parameters:
      value - value to set