wgtmac commented on code in PR #34889:
URL: https://github.com/apache/arrow/pull/34889#discussion_r1161375739
##########
cpp/src/parquet/metadata.h:
##########
@@ -510,24 +510,23 @@ class PARQUET_EXPORT FileMetaDataBuilder {
public:
// API convenience to get a MetaData reader
static std::unique_ptr<FileMetaDataBuilder> Make(
- const SchemaDescriptor* schema, std::shared_ptr<WriterProperties> props,
- std::shared_ptr<const KeyValueMetadata> key_value_metadata = NULLPTR);
+ const SchemaDescriptor* schema, std::shared_ptr<WriterProperties> props);
Review Comment:
Sounds reasonable. Fixed.
The only caveat is that the old overload simply ignores the input
`key_value_metadata` which may confuses users.
##########
cpp/src/parquet/file_writer.cc:
##########
@@ -356,6 +355,15 @@ class FileSerializer : public ParquetFileWriter::Contents {
RowGroupWriter* AppendBufferedRowGroup() override { return
AppendRowGroup(true); }
+ void AddKeyValueMetadata(
+ std::shared_ptr<const KeyValueMetadata> key_value_metadata) override {
+ if (key_value_metadata_ == nullptr) {
+ key_value_metadata_ = std::move(key_value_metadata);
+ } else if (key_value_metadata != nullptr) {
+ key_value_metadata_ = key_value_metadata_->Merge(*key_value_metadata);
Review Comment:
Fixed
--
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]