Soham-Bhattacharjee-work opened a new pull request, #21985: URL: https://github.com/apache/datafusion/pull/21985
## Which issue does this PR close? - Closes #21974 . ## Rationale for this change The conversions from `ConfigFileDecryptionProperties` to `FileDecryptionProperties` and from `ConfigFileEncryptionProperties` to `FileEncryptionProperties` currently use From, but the implementations contain several unwrap() and expect() calls which can cause panics for invalid or wrong inputs. Instead of panics we can gracefully return `DataFusionError::Confoguration` errors. ## What changes are included in this PR? ``` rust impl From<ConfigFileEncryptionProperties> for FileEncryptionProperties ``` becomes ``` rust impl TryFrom<ConfigFileEncryptionProperties> for FileEncryptionProperties ``` Similarly ```rust impl From<ConfigFileDecryptionProperties> for FileDecryptionProperties ``` becomes ```rust impl TryFrom<ConfigFileDecryptionProperties> for FileDecryptionProperties ``` These are header changes with accompanied implementation changes ## Are these changes tested? Yes tests are added in `datafusion/common/src/config.rs` ## Are there any user-facing changes? No according to me, they are not. They are part of `datafusion-common`. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
