We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c396d63 commit 9f1b55fCopy full SHA for 9f1b55f
datafusion/core/src/execution/context/mod.rs
@@ -1079,10 +1079,9 @@ impl SessionContext {
1079
// Register UDFs that return values based on session configuration
1080
// e.g. now() which depends on the time_zone configuration option
1081
if variable == "datafusion.execution.time_zone" {
1082
- let state = self.state.read();
1083
- let config_options = state.config().options().clone();
1084
- drop(state);
+ let config_options = self.state.read().config().options().clone();
1085
let now_udf = {
+ // recreate the function so it captures the new time zone
1086
make_udf_function_with_config!(NowFunc, now, &ConfigOptions);
1087
now(&config_options)
1088
};
0 commit comments