DNF32 opened a new pull request, #27845: URL: https://github.com/apache/datafusion/pull/27845
## Which issue does this PR close? Refs #17498. This PR addresses the `datetime_format` setting only. Related to #27275. ## Rationale for this change Previously, `SET datafusion.format.datetime_format = '%';` succeeded in the DataFusion CLI. The error only appeared when the CLI tried to print query results, and users had to reset the setting before they could print results again. ## What changes are included in this PR? Validate `datafusion.format.datetime_format` when it is set. If the format is invalid, return an error and keep the previous value. ## What is the testing strategy for this PR? Added a SQL logic regression test in `set_variable.slt` that verifies that `SET` rejects an invalid datetime format. ## Are there any user-facing changes? Yes. Invalid datetime formats now produce an error immediately when they are set. In the public Rust API, `FormatOptions::datetime_format` changes from `Option<String>` to `Option<DateTimeFormat>`. -- 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]
