Class DictEncodedStringArrayAndVectorTransfer<T>
java.lang.Object
io.deephaven.parquet.table.transfer.ArrayAndVectorTransfer<COLUMN_TYPE,ENCODED_COLUMN_TYPE,BUFFER_TYPE>
io.deephaven.parquet.table.transfer.DictEncodedStringArrayAndVectorTransfer<T>
- All Implemented Interfaces:
TransferObject<IntBuffer>
,SafeCloseable
,AutoCloseable
public abstract class DictEncodedStringArrayAndVectorTransfer<T>
extends ArrayAndVectorTransfer<COLUMN_TYPE,ENCODED_COLUMN_TYPE,BUFFER_TYPE>
Base class for reading dictionary-encoded string arrays and vectors. This class updates the
StringDictionary
with all the strings it encounters and generates an integer array of dictionary position values. This class extends
PrimitiveArrayAndVectorTransfer
to manage the dictionary positions similar to an integer array column.-
Method Summary
Modifier and TypeMethodDescriptionfinal void
close()
final IntBuffer
Get the buffer suitable for writing to a Parquet filefinal boolean
Check if there is any more data which can be copied into bufferfinal boolean
Returns whether we encountered any null value while transferring page data to buffer.final int
Transfer one page size worth of fetched data into an internal buffer, which can then be accessed usingTransferObject.getBuffer()
.Methods inherited from class io.deephaven.parquet.table.transfer.ArrayAndVectorTransfer
getRepeatCount
-
Method Details
-
transferOnePageToBuffer
public final int transferOnePageToBuffer()Description copied from interface:TransferObject
Transfer one page size worth of fetched data into an internal buffer, which can then be accessed usingTransferObject.getBuffer()
. The target page size is passed in the constructor. For dictionary encoded string transfers, this method also updates the dictionary with the strings encountered.- Specified by:
transferOnePageToBuffer
in interfaceTransferObject<T>
- Returns:
- The number of fetched data entries copied into the buffer. This can be different from the total number of entries fetched in case of variable-width types (e.g. strings) when used with additional page size limits while copying.
-
pageHasNull
public final boolean pageHasNull()Description copied from interface:TransferObject
Returns whether we encountered any null value while transferring page data to buffer. This method is only used for dictionary encoded string transfer objects. This method should be called afterTransferObject.transferOnePageToBuffer()
and the state resets everytime we callTransferObject.transferOnePageToBuffer()
. -
getBuffer
Description copied from interface:TransferObject
Get the buffer suitable for writing to a Parquet file- Specified by:
getBuffer
in interfaceTransferObject<COLUMN_TYPE>
- Returns:
- the buffer
-
hasMoreDataToBuffer
public final boolean hasMoreDataToBuffer()Description copied from interface:TransferObject
Check if there is any more data which can be copied into buffer- Specified by:
hasMoreDataToBuffer
in interfaceTransferObject<COLUMN_TYPE>
-
close
public final void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSafeCloseable
-