timsaucer commented on code in PR #24179:
URL: https://github.com/apache/datafusion/pull/24179#discussion_r3783245994
##########
datafusion-cli/src/main.rs:
##########
@@ -243,9 +252,16 @@ async fn main_inner() -> Result<()> {
let runtime_env = rt_builder.build_arc()?;
+ let mut state_builder = SessionStateBuilder::new()
+ .with_config(session_config)
+ .with_runtime_env(runtime_env)
+ .with_default_features();
+ if args.spark {
+ state_builder = state_builder.with_spark_features();
+ }
+
// enable dynamic file query
- let ctx = SessionContext::new_with_config_rt(session_config, runtime_env)
- .enable_url_table();
+ let ctx =
SessionContext::new_with_state(state_builder.build()).enable_url_table();
Review Comment:
This is annoying, because we end up creating a session to just turn it back
into a builder to add in the url table catalog and then turn it back into a
session. Changing it would be a larger PR, so I suppose this is fine.
--
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]