Class StringDictionary
java.lang.Object
io.deephaven.parquet.table.transfer.StringDictionary
Stores a dictionary of strings and returns their position in the dictionary, useful for encoding string columns.
-
Constructor Summary
ConstructorDescriptionStringDictionary
(int maxKeys, int maxDictSize, org.apache.parquet.column.statistics.Statistics<?> statistics, int nullPos) -
Method Summary
Modifier and TypeMethodDescriptionint
Add a string key to the dictionary if it's not already present.org.apache.parquet.io.api.Binary[]
int
-
Constructor Details
-
StringDictionary
public StringDictionary(int maxKeys, int maxDictSize, org.apache.parquet.column.statistics.Statistics<?> statistics, int nullPos)
-
-
Method Details
-
getKeyCount
public int getKeyCount() -
getEncodedKeys
public org.apache.parquet.io.api.Binary[] getEncodedKeys() -
add
Add a string key to the dictionary if it's not already present.- Parameters:
key
- The key to add and/or find the position for- Returns:
key
's position in the dictionary, or special null key position (passed in constructor) ifkey == null
-