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 voidclose()final IntBufferGet the buffer suitable for writing to a Parquet filefinal booleanCheck if there is any more data which can be copied into bufferfinal booleanReturns whether we encountered any null value while transferring page data to buffer.final intTransfer 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:TransferObjectTransfer 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:
transferOnePageToBufferin 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:TransferObjectReturns 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:TransferObjectGet the buffer suitable for writing to a Parquet file- Specified by:
getBufferin interfaceTransferObject<COLUMN_TYPE>- Returns:
- the buffer
-
hasMoreDataToBuffer
public final boolean hasMoreDataToBuffer()Description copied from interface:TransferObjectCheck if there is any more data which can be copied into buffer- Specified by:
hasMoreDataToBufferin interfaceTransferObject<COLUMN_TYPE>
-
close
public final void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSafeCloseable
-