Skip to content

Commit 24d4830

Browse files
Construct Executor with functions
1 parent a157581 commit 24d4830

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

ballista/executor/src/executor.rs

+21
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,27 @@ impl Executor {
8888
abort_handles: Default::default(),
8989
}
9090
}
91+
92+
pub fn with_functions(
93+
metadata: ExecutorRegistration,
94+
work_dir: &str,
95+
runtime: Arc<RuntimeEnv>,
96+
metrics_collector: Arc<dyn ExecutorMetricsCollector>,
97+
concurrent_tasks: usize,
98+
scalar_functions: HashMap<String, Arc<ScalarUDF>>,
99+
aggregate_functions: HashMap<String, Arc<AggregateUDF>>,
100+
) -> Self {
101+
Self {
102+
metadata,
103+
work_dir: work_dir.to_owned(),
104+
scalar_functions,
105+
aggregate_functions,
106+
runtime,
107+
metrics_collector,
108+
concurrent_tasks,
109+
abort_handles: Default::default(),
110+
}
111+
}
91112
}
92113

93114
impl Executor {

0 commit comments

Comments
 (0)