milenkovicm commented on code in PR #1345:
URL:
https://github.com/apache/datafusion-ballista/pull/1345#discussion_r2557178713
##########
ballista/executor/src/execution_loop.rs:
##########
@@ -251,8 +250,7 @@ async fn run_received_task<T: 'static + AsLogicalPlan, U:
'static + AsExecutionP
.with_config(session_config.clone())
.with_runtime_env(runtime.clone())
.build();
- let ctx = SessionContext::new_with_state(session_state);
- //
+ let ctx = SessionContext::new_with_state(session_state).task_ctx();
Review Comment:
can we create TaskContext directly? we should have all required info for
TaskContext
##########
Cargo.toml:
##########
@@ -27,27 +27,28 @@ resolver = "2"
#
edition = "2021"
# we should try to follow datafusion version
-rust-version = "1.86.0"
+rust-version = "1.88.0"
Review Comment:
I think it makes sense
##########
ballista/core/src/serde/mod.rs:
##########
@@ -286,37 +286,33 @@ impl PhysicalExtensionCodec for
BallistaPhysicalExtensionCodec {
// more details at
https://github.com/apache/datafusion/issues/17596
let mut state =
SessionStateBuilder::new_with_default_features().build();
- for function_name in registry.udfs() {
- if let Ok(function) = registry.udf(&function_name) {
+ for function_name in ctx.udfs() {
+ if let Ok(function) = ctx.udf(&function_name) {
state.register_udf(function)?;
}
}
- for function_name in registry.udafs() {
- if let Ok(function) = registry.udaf(&function_name) {
+ for function_name in ctx.udafs() {
+ if let Ok(function) = ctx.udaf(&function_name) {
state.register_udaf(function)?;
}
}
- for function_name in registry.udafs() {
- if let Ok(function) = registry.udaf(&function_name) {
+ for function_name in ctx.udafs() {
+ if let Ok(function) = ctx.udaf(&function_name) {
state.register_udaf(function)?;
}
}
- let ctx = SessionContext::new_with_state(state);
-
- //
- //
- //
+ let ctx = SessionContext::new_with_state(state).task_ctx();
Review Comment:
same comment, can we create task context directly ?
--
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]