File tree Expand file tree Collapse file tree
docs/source/library-user-guide/upgrading Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,6 +228,31 @@ let mut config = SessionConfig::new();
228228config.options_mut().execution.enable_nlj_coordinated_fallback = false;
229229```
230230
231+ ### ` ExecutionOptions::time_zone ` is now a validated ` ConfigTimeZone `
232+
233+ ` ExecutionOptions::time_zone ` changed from ` Option<String> ` to
234+ ` Option<ConfigTimeZone> ` . The value is now checked when it is set, so
235+ ` SET TIME ZONE = 'Asia/Taipei2' ` fails immediately instead of on a later query.
236+ The string is kept exactly as written (` +08 ` stays ` +08 ` ).
237+
238+ ** Who is affected:**
239+
240+ - Code that reads or assigns ` ExecutionOptions::time_zone ` directly.
241+ - Code that sets the value through SQL ` SET ` or ` ConfigOptions::set ` needs no
242+ code changes, but invalid time zones are now rejected immediately.
243+
244+ ** Migration guide:**
245+
246+ ``` rust,ignore
247+ // Before
248+ options.execution.time_zone = Some("America/Denver".to_string());
249+ let tz: Option<String> = options.execution.time_zone.clone();
250+
251+ // After
252+ options.execution.time_zone = Some("America/Denver".parse()?);
253+ let tz: Option<&str> = options.execution.time_zone.as_ref().map(|tz| tz.as_str());
254+ ```
255+
231256### ` datafusion.optimizer.use_statistics_registry ` is deprecated and ignored
232257
233258The ` datafusion.optimizer.use_statistics_registry ` config flag is deprecated and
You can’t perform that action at this time.
0 commit comments