Package org.apache.parquet.column.values
Interface RequiresFallback
-
- All Known Implementing Classes:
DictionaryValuesWriter,DictionaryValuesWriter.PlainBinaryDictionaryValuesWriter,DictionaryValuesWriter.PlainDoubleDictionaryValuesWriter,DictionaryValuesWriter.PlainFixedLenArrayDictionaryValuesWriter,DictionaryValuesWriter.PlainFloatDictionaryValuesWriter,DictionaryValuesWriter.PlainIntegerDictionaryValuesWriter,DictionaryValuesWriter.PlainLongDictionaryValuesWriter
public interface RequiresFallbackUsed to add extra behavior to a ValuesWriter that requires fallback- See Also:
FallbackValuesWriter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfallBackAllValuesTo(ValuesWriter writer)When falling back to a different encoding we must re-encode all the values seen so farbooleanisCompressionSatisfying(long rawSize, long encodedSize)Before writing the first page we will verify if the encoding is worth it.booleanshouldFallBack()In the case of a dictionary based encoding we will fallback if the dictionary becomes too big
-
-
-
Method Detail
-
shouldFallBack
boolean shouldFallBack()
In the case of a dictionary based encoding we will fallback if the dictionary becomes too big- Returns:
- true to notify the parent that we should fallback to another encoding
-
isCompressionSatisfying
boolean isCompressionSatisfying(long rawSize, long encodedSize)Before writing the first page we will verify if the encoding is worth it. and fall back if a simpler encoding would be better in that case- Parameters:
rawSize- the size if encoded with plainencodedSize- the size as encoded by the current encoding- Returns:
- true if we keep this encoding
-
fallBackAllValuesTo
void fallBackAllValuesTo(ValuesWriter writer)
When falling back to a different encoding we must re-encode all the values seen so far- Parameters:
writer- the new encoder to write the current values to
-
-