Package io.deephaven.parquet.base
Interface BulkWriter<BUFFER_TYPE>
- All Known Implementing Classes:
AbstractBulkValuesWriter,PlainBinaryChunkedWriter,PlainBooleanChunkedWriter,PlainDoubleChunkedWriter,PlainFloatChunkedWriter,PlainIntChunkedWriter,PlainLongChunkedWriter,RleIntChunkedWriter
public interface BulkWriter<BUFFER_TYPE>
Provides the option to write values of specific type in bulk The concrete type of the bulkValue object depends on the
specific implementation
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionGet a view of this writerByteBuffer.voidreset()Clear all internal state.voidwriteBulk(BUFFER_TYPE bulkValues, int rowCount, @NotNull org.apache.parquet.column.statistics.Statistics<?> statistics) Write a buffer's worth of values to the underlying page.@NotNull BulkWriter.WriteResultwriteBulkFilterNulls(BUFFER_TYPE bulkValues, @NotNull org.apache.parquet.column.values.rle.RunLengthBitPackingHybridEncoder dlEncoder, int rowCount, @NotNull org.apache.parquet.column.statistics.Statistics<?> statistics) Write a buffer's worth of values to the underlying page.intwriteBulkVector(BUFFER_TYPE bulkValues, @NotNull IntBuffer vectorSizes, @NotNull org.apache.parquet.column.values.rle.RunLengthBitPackingHybridEncoder rlEncoder, @NotNull org.apache.parquet.column.values.rle.RunLengthBitPackingHybridEncoder dlEncoder, int nonNullValueCount, @NotNull org.apache.parquet.column.statistics.Statistics<?> statistics) Write a buffer's worth of packed vector values to the underlying page.@NotNull BulkWriter.WriteResultwriteBulkVectorFilterNulls(BUFFER_TYPE bulkValues, int rowCount, @NotNull org.apache.parquet.column.statistics.Statistics<?> statistics) Write a buffer's worth of packed vector values to the underlying page, skipping null values.
-
Method Details
-
writeBulk
void writeBulk(@NotNull BUFFER_TYPE bulkValues, int rowCount, @NotNull @NotNull org.apache.parquet.column.statistics.Statistics<?> statistics) Write 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 @NotNull BulkWriter.WriteResult writeBulkFilterNulls(@NotNull BUFFER_TYPE bulkValues, @NotNull @NotNull org.apache.parquet.column.values.rle.RunLengthBitPackingHybridEncoder dlEncoder, int rowCount, @NotNull @NotNull org.apache.parquet.column.statistics.Statistics<?> statistics) throws IOException Write 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 writtenstatistics- theStatisticsobject to modify.- Returns:
- a
BulkWriter.WriteResultcontaining the statistics of the result. - Throws:
IOException- if there was an error during write.
-
writeBulkVector
int writeBulkVector(@NotNull BUFFER_TYPE bulkValues, @NotNull @NotNull IntBuffer vectorSizes, @NotNull @NotNull org.apache.parquet.column.values.rle.RunLengthBitPackingHybridEncoder rlEncoder, @NotNull @NotNull org.apache.parquet.column.values.rle.RunLengthBitPackingHybridEncoder dlEncoder, int nonNullValueCount, @NotNull @NotNull org.apache.parquet.column.statistics.Statistics<?> statistics) throws IOException Write a buffer's worth of packed vector values to the underlying page. This method will set the proper definition level and repetition values in the encoders fornullvalues.- Parameters:
bulkValues- the packed array valuesvectorSizes- a buffer where each element contains the number of elements in each packed vector.rlEncoder- the repetition level encoderdlEncoder- the definition level encoder.nonNullValueCount- the total count of non-null values- Returns:
- the number of values actually written
- Throws:
IOException- if writing failed.
-
writeBulkVectorFilterNulls
@NotNull @NotNull BulkWriter.WriteResult writeBulkVectorFilterNulls(@NotNull BUFFER_TYPE bulkValues, int rowCount, @NotNull @NotNull org.apache.parquet.column.statistics.Statistics<?> statistics) Write 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 writerowCount- the number of rows being written.- Returns:
- a
BulkWriter.WriteResultcontaining the statistics of the result.
-
reset
void reset()Clear all internal state. -
getByteBufferView
Get a view of this writerByteBuffer.- Returns:
- a
ByteBuffercontaining the written data. - Throws:
IOException- if there is an exception reading the data.
-