Package io.deephaven.parquet.base
Class PlainBinaryChunkedWriter
java.lang.Object
org.apache.parquet.column.values.ValuesWriter
io.deephaven.parquet.base.AbstractBulkValuesWriter<org.apache.parquet.io.api.Binary[]>
io.deephaven.parquet.base.PlainBinaryChunkedWriter
- All Implemented Interfaces:
BulkWriter<org.apache.parquet.io.api.Binary[]>,AutoCloseable
public class PlainBinaryChunkedWriter
extends AbstractBulkValuesWriter<org.apache.parquet.io.api.Binary[]>
Plain encoding except for binary values
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.parquet.base.BulkWriter
BulkWriter.WriteResult -
Field Summary
Fields inherited from class io.deephaven.parquet.base.AbstractBulkValuesWriter
MAX_ARRAY_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionPlainBinaryChunkedWriter(int pageSize, @NotNull org.apache.parquet.bytes.ByteBufferAllocator allocator) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longlongGet a view of this writerByteBuffer.org.apache.parquet.bytes.BytesInputgetBytes()org.apache.parquet.column.EncodingmemUsageString(String prefix) voidreset()Clear all internal state.voidwriteBulk(@NotNull org.apache.parquet.io.api.Binary[] bulkValues, int rowCount) Write a buffer's worth of values to the underlying page.@NotNull BulkWriter.WriteResultwriteBulkFilterNulls(@NotNull org.apache.parquet.io.api.Binary[] bulkValues, int nonNullLeafCount) Write a buffer's worth of packed vector values to the underlying page, skipping null values.@NotNull BulkWriter.WriteResultwriteBulkFilterNulls(@NotNull org.apache.parquet.io.api.Binary[] bulkValues, @NotNull org.apache.parquet.column.values.rle.RunLengthBitPackingHybridEncoder dlEncoder, int rowCount) Write a buffer's worth of values to the underlying page.final voidwriteBytes(org.apache.parquet.io.api.Binary v) Methods inherited from class io.deephaven.parquet.base.AbstractBulkValuesWriter
writeBulkVectorMethods inherited from class org.apache.parquet.column.values.ValuesWriter
resetDictionary, toDictPageAndClose, writeBoolean, writeByte, writeDouble, writeFloat, writeInteger, writeLong
-
Constructor Details
-
PlainBinaryChunkedWriter
public PlainBinaryChunkedWriter(int pageSize, @NotNull @NotNull org.apache.parquet.bytes.ByteBufferAllocator allocator)
-
-
Method Details
-
writeBytes
public final void writeBytes(org.apache.parquet.io.api.Binary v) - Overrides:
writeBytesin classorg.apache.parquet.column.values.ValuesWriter
-
getBufferedSize
public long getBufferedSize()- Specified by:
getBufferedSizein classorg.apache.parquet.column.values.ValuesWriter
-
getBytes
public org.apache.parquet.bytes.BytesInput getBytes()- Specified by:
getBytesin classorg.apache.parquet.column.values.ValuesWriter
-
reset
public void reset()Description copied from interface:BulkWriterClear all internal state.- Specified by:
resetin interfaceBulkWriter<org.apache.parquet.io.api.Binary[]>- Specified by:
resetin classorg.apache.parquet.column.values.ValuesWriter
-
getByteBufferView
Description copied from interface:BulkWriterGet a view of this writerByteBuffer.- Returns:
- a
ByteBuffercontaining the written data.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classorg.apache.parquet.column.values.ValuesWriter
-
getAllocatedSize
public long getAllocatedSize()- Specified by:
getAllocatedSizein classorg.apache.parquet.column.values.ValuesWriter
-
getEncoding
public org.apache.parquet.column.Encoding getEncoding()- Specified by:
getEncodingin classorg.apache.parquet.column.values.ValuesWriter
-
memUsageString
- Specified by:
memUsageStringin classorg.apache.parquet.column.values.ValuesWriter
-
writeBulk
public void writeBulk(@NotNull @NotNull org.apache.parquet.io.api.Binary[] bulkValues, int rowCount) Description copied from interface:BulkWriterWrite a buffer's worth of values to the underlying page.- Parameters:
bulkValues- the buffer of valuesrowCount- the total number of rows to write.
-
writeBulkFilterNulls
@NotNull public @NotNull BulkWriter.WriteResult writeBulkFilterNulls(@NotNull @NotNull org.apache.parquet.io.api.Binary[] bulkValues, @NotNull @NotNull org.apache.parquet.column.values.rle.RunLengthBitPackingHybridEncoder dlEncoder, int rowCount) throws IOException Description copied from interface:BulkWriterWrite a buffer's worth of values to the underlying page. This method will find, without writing,nullvalues and record their offsets in anIntBufferin the result. The appropriate definition level will be set for null values.- Parameters:
bulkValues- the values to writedlEncoder- the encoder for definition levelsrowCount- the number of rows being written- Returns:
- a
BulkWriter.WriteResultcontaining the statistics of the result. - Throws:
IOException- if there was an error during write.
-
writeBulkFilterNulls
@NotNull public @NotNull BulkWriter.WriteResult writeBulkFilterNulls(@NotNull @NotNull org.apache.parquet.io.api.Binary[] bulkValues, int nonNullLeafCount) Description copied from interface:BulkWriterWrite a buffer's worth of packed vector values to the underlying page, skipping null values. This method will findnullvalues and record their offsets in anIntBufferin the result.- Parameters:
bulkValues- the packed vector values to writenonNullLeafCount- the number of rows being written.- Returns:
- a
BulkWriter.WriteResultcontaining the statistics of the result.
-