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
public abstract class PrimitiveConverter extends Converter
converter for leaves of the schema
-
-
Constructor Summary
Constructors Constructor Description PrimitiveConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBinary(Binary value)voidaddBoolean(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 dictionaryPrimitiveConverterasPrimitiveConverter()booleanhasDictionarySupport()if it returns true we will attempt to use dictionary based conversion insteadbooleanisPrimitive()voidsetDictionary(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
-
-
-
-
Method Detail
-
isPrimitive
public boolean isPrimitive()
- Specified by:
isPrimitivein classConverter
-
asPrimitiveConverter
public PrimitiveConverter 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
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
-
-