Package org.apache.parquet.io.api
Class PrimitiveConverter
java.lang.Object
org.apache.parquet.io.api.Converter
org.apache.parquet.io.api.PrimitiveConverter
- Direct Known Subclasses:
FilteringPrimitiveConverter
converter for leaves of the schema
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddBoolean(boolean value) voidaddDouble(double value) voidaddFloat(float value) voidaddInt(int value) voidaddLong(long value) voidaddValueFromDictionary(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 dictionarybooleanif it returns true we will attempt to use dictionary based conversion insteadbooleanvoidsetDictionary(Dictionary dictionary) Set the dictionary to use if the data was encoded using dictionary encoding and the converter hasDictionarySupport().Methods inherited from class org.apache.parquet.io.api.Converter
asGroupConverter
-
Constructor Details
-
PrimitiveConverter
public PrimitiveConverter()
-
-
Method Details
-
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitivein classConverter
-
asPrimitiveConverter
- Overrides:
asPrimitiveConverterin classConverter
-
hasDictionarySupport
public boolean hasDictionarySupport()if it returns true we will attempt to use dictionary based conversion instead- Returns:
- if dictionary is supported
-
setDictionary
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
- 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
-