autoCAT6 opened a new issue, #11753: URL: https://github.com/apache/arrow-rs/issues/11753
### Is your feature request related to a problem or challenge? `FileEncryptionProperties::column_keys()` returns three vectors containing column names, keys, and key-retrieval metadata. Names and keys include every configured column, but metadata includes only entries whose metadata is present. For example, configure a key for `first` without metadata and a key for `second` with metadata `second-key-id`. The returned names and keys each have two entries, while the metadata vector has one. A caller cannot determine which column owns that metadata from these vectors alone; zipping names with metadata can associate a key identifier with the wrong column. The internal map's iteration order is not an association contract. This affects consumers that convert encryption properties to another configuration representation and need to preserve each column's key identifier. ### Describe the solution you'd like Add a name-based accessor: ```rust pub fn column_key_metadata(&self, column_name: &str) -> Option<&[u8]> ``` The accessor should return the named column's metadata without cloning it, return `None` when that column has no explicitly configured key or its key has no metadata, and preserve explicitly empty metadata as `Some(&[])`. It should not substitute footer-key metadata for a column. Keep the existing `column_keys()` signature and behavior unchanged. Regression coverage should include mixed present/absent metadata, different insertion orders, distinct identifiers on multiple columns, unknown column names, explicitly empty metadata, and the footer-key boundary. ### Describe alternatives you've considered Changing the metadata vector to contain optional entries or returning structured column entries could preserve positional associations, but would change the existing API. Filling missing metadata with empty bytes would lose the distinction between absent and explicitly empty metadata. A separate name-based accessor is additive and retains that distinction. ### Additional context Implementation: #11733. One downstream use is preserving per-column identifiers during conversion of Parquet encryption properties: https://github.com/apache/datafusion/pull/26513. -- 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]
