Copilot commented on code in PR #51692:
URL: https://github.com/apache/arrow/pull/51692#discussion_r4182829895
##########
cpp/src/parquet/column_writer.cc:
##########
@@ -775,11 +778,11 @@ class ColumnWriterImpl {
compressor_temp_buffer_ =
std::static_pointer_cast<ResizableBuffer>(AllocateBuffer(allocator_,
0));
}
- if (properties_->content_defined_chunking_enabled()) {
- auto cdc_options = properties_->content_defined_chunking_options();
- content_defined_chunker_.emplace(level_info_, cdc_options.min_chunk_size,
- cdc_options.max_chunk_size,
- cdc_options.norm_level);
+ if (properties_->content_defined_chunking_enabled() &&
+ content_defined_chunker_ == nullptr) {
+ throw ParquetException(
+ "Content-defined chunking is not supported in ColumnWriter::Make(),
use "
+ "ParquetFileWriter instead.");
Review Comment:
The exported `ColumnWriter::Make()` previously supported CDC by owning its
chunker, but the public overload now always passes `nullptr`, so existing
low-level callers with CDC enabled fail at runtime. Preserve that API by having
the public path create and retain its own chunker; only file-writer-created
column writers should borrow the file-level chunker.
--
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]