The ConfigFileDecryptionProperties type implements From<&Arc<FileDecryptionProperties>>
But ConfigFileDecryptionProperties is unable to represent decryption properties that use a key retriever to dynamically retrieve keys. If the FileDecryptionProperties uses a key retriever, trying to get the footer key will fail and a default empty key will be silently used:
|
f.footer_key(None).unwrap_or_default().as_ref(), |
This can lead to unexpected behaviour and hard to track down bugs.
We should instead implement TryFrom so it's clear that this can fail, and return a helpful error on failure.
The
ConfigFileDecryptionPropertiestype implementsFrom<&Arc<FileDecryptionProperties>>But
ConfigFileDecryptionPropertiesis unable to represent decryption properties that use a key retriever to dynamically retrieve keys. If theFileDecryptionPropertiesuses a key retriever, trying to get the footer key will fail and a default empty key will be silently used:datafusion/datafusion/common/src/config.rs
Line 3044 in e0fd16e
This can lead to unexpected behaviour and hard to track down bugs.
We should instead implement
TryFromso it's clear that this can fail, and return a helpful error on failure.