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

   ## Which issue does this PR close?
   
   - Part of #17498
   
   ## Rationale for this change
   
   `datafusion.execution.time_zone` accepts a string value, but invalid values 
were previously stored and only failed later when timestamp operations tried to 
parse the timezone. This validates the timezone when the setting is changed so 
invalid configuration is rejected immediately and the previous valid value 
remains active.
   
   ## What changes are included in this PR?
   
   - Validate `datafusion.execution.time_zone` in `ConfigOptions::set` using 
Arrow's timezone parser before mutating the stored value.
   - Add unit coverage for valid timezone strings, invalid timezone strings, 
and preserving the previous value after a rejected update.
   - Update `set_variable.slt` coverage so invalid `SET TIME ZONE` statements 
fail at assignment time.
   
   ## Are these changes tested?
   
   Yes.
   
   - `cargo fmt --all --check`
   - `./dev/rust_lint.sh`
   - `cargo test -p datafusion-common test_execution_time_zone_validation`
   - `cargo test -p datafusion-common`
   - `cargo test --profile=ci --test sqllogictests -- set_variable`
   - `cargo test --profile=ci --test sqllogictests`
   - `cargo test -p datafusion`
   - `cargo test -p datafusion-cli`
   
   I also verified the CLI behavior with a SQL script that sets a valid 
timezone, rejects an invalid timezone, and confirms `SHOW TIME ZONE` still 
reports the previous valid value.
   
   ## Are there any user-facing changes?
   
   Yes. Invalid `SET TIME ZONE` values now fail immediately instead of being 
accepted and causing later timestamp operations to fail.
   


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