Skip to content

Commit 9f1b55f

Browse files
committed
chore
1 parent c396d63 commit 9f1b55f

File tree

1 file changed

+2
-3
lines changed
  • datafusion/core/src/execution/context

1 file changed

+2
-3
lines changed

datafusion/core/src/execution/context/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,10 +1079,9 @@ impl SessionContext {
10791079
// Register UDFs that return values based on session configuration
10801080
// e.g. now() which depends on the time_zone configuration option
10811081
if variable == "datafusion.execution.time_zone" {
1082-
let state = self.state.read();
1083-
let config_options = state.config().options().clone();
1084-
drop(state);
1082+
let config_options = self.state.read().config().options().clone();
10851083
let now_udf = {
1084+
// recreate the function so it captures the new time zone
10861085
make_udf_function_with_config!(NowFunc, now, &ConfigOptions);
10871086
now(&config_options)
10881087
};

0 commit comments

Comments
 (0)