Skip to content

[C++][Parquet] parquet::arrow::FileWriter does not propagate schema-level metadata when ArrowWriterProperties::store_schema is false #41766

Open

Description

@TheNeuralBit

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;
return Status::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

Activity

  1. jorisvandenbossche commented on May 22, 2024

    @jorisvandenbossche
    Member

    See also related discussion in #31723 (it's more specifically about the reading side, but it also notices this strange inconsistency of not writing the metadata when disabling to write ARROW:schema)

  2. added
    Status: confirmed
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Component: ParquetStatus: confirmedType: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions