Describe the bug, including details regarding any error messages, version, and platform.
When store_schema is true the FileWriter first copies any existing metadata before storing the serialized schema:
| std::shared_ptr<KeyValueMetadata> result; |
| if (schema.metadata()) { |
| result = schema.metadata()->Copy(); |
| } else { |
| result = ::arrow::key_value_metadata({}, {}); |
| } |
But when store_schema is false, the FileWriter just returns an empty metadata, and custom metadata is not copied:
| if (!properties.store_schema()) { |
| *out = nullptr; |
| returnStatus::OK(); |
| } |
Could someone confirm if this is intentional or not? It looks like an oversight to me and I have a patch ready to address it.
Component(s)
Parquet
Describe the bug, including details regarding any error messages, version, and platform.
When
store_schemais true theFileWriterfirst copies any existing metadata before storing the serialized schema:arrow/cpp/src/parquet/arrow/writer.cc
Lines 537 to 542 in 8169d6e
But when
store_schemais false, theFileWriterjust returns an empty metadata, and custom metadata is not copied:arrow/cpp/src/parquet/arrow/writer.cc
Lines 531 to 534 in 8169d6e
Could someone confirm if this is intentional or not? It looks like an oversight to me and I have a patch ready to address it.
Component(s)
Parquet