rahil-c commented on code in PR #3396:
URL: https://github.com/apache/parquet-java/pull/3396#discussion_r2838257863
##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ColumnChunkPageWriteStore.java:
##########
@@ -672,6 +673,83 @@ public ColumnChunkPageWriteStore(
}
}
+ /**
+ * Construct a page write store with per-column compression support.
+ * Each column's compression codec is resolved from {@code props} via
+ * {@link ParquetProperties#getCompressionCodec(ColumnDescriptor)}.
+ *
+ * @param codecFactory factory to create compressors for each codec
+ * @param props properties containing per-column
compression configuration
+ * @param schema the message schema
+ * @param allocator byte buffer allocator
+ * @param columnIndexTruncateLength truncate length for column indexes
+ * @param pageWriteChecksumEnabled whether to write page checksums
+ * @param fileEncryptor file encryptor (null if not encrypted)
+ * @param rowGroupOrdinal row group ordinal
+ */
+ public ColumnChunkPageWriteStore(
+ CompressionCodecFactory codecFactory,
+ ParquetProperties props,
+ MessageType schema,
+ ByteBufferAllocator allocator,
+ int columnIndexTruncateLength,
+ boolean pageWriteChecksumEnabled,
+ InternalFileEncryptor fileEncryptor,
+ int rowGroupOrdinal) {
+ this.schema = schema;
+ if (null == fileEncryptor) {
+ for (ColumnDescriptor path : schema.getColumns()) {
+ BytesInputCompressor compressor =
codecFactory.getCompressor(props.getCompressionCodec(path));
+ writers.put(
+ path,
+ new ColumnChunkPageWriter(
Review Comment:
It looks like we currently do not have a `ColumnChunkPageWriterBuilder`, if
that is the ideal pattern i can look into adding this builder.
<img width="1061" height="376" alt="Screenshot 2026-02-22 at 8 55 28 AM"
src="https://github.com/user-attachments/assets/da8b98d6-2bea-4577-8256-1bf5993f0536"
/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]