Yubinghan1 opened a new pull request, #27986:
URL: https://github.com/apache/datafusion/pull/27986

   ## Which issue does this PR close?
   
   Part of #17498. This covers `datafusion.format.time_format`.
   
   ## Rationale for this change
   
   `SET datafusion.format.time_format = '%Y'` succeeds today, even though a 
time of day has no year. The error only shows up when the CLI tries to print a 
result.
   
   ## What changes are included in this PR?
   
   Reuse the display-format check from #26045 in the config setter for 
`time_format`. The validator runs before writing to the existing 
`Option<String>` field.
   
   ## What is the testing strategy for this PR?
   
   `set_variable.slt` covers an incomplete directive (`%`) and a year directive 
(`%Y`). It also checks that `SHOW` still returns the previous format.
   
   ## Are there any user-facing changes?
   
   An invalid `SET` now returns a configuration error immediately and leaves 
the previous format in effect.
   


-- 
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]

Reply via email to