risingwave_stream/from_proto/approx_percentile/
local.rs1use risingwave_pb::stream_plan::LocalApproxPercentileNode;
16
17use crate::executor::LocalApproxPercentileExecutor;
18use crate::from_proto::*;
19
20pub struct LocalApproxPercentileExecutorBuilder;
21
22impl ExecutorBuilder for LocalApproxPercentileExecutorBuilder {
23 type Node = LocalApproxPercentileNode;
24
25 async fn new_boxed_executor(
26 params: ExecutorParams,
27 node: &Self::Node,
28 _store: impl StateStore,
29 ) -> StreamResult<Executor> {
30 let [input]: [_; 1] = params.input.try_into().unwrap();
31 let exec = LocalApproxPercentileExecutor::new(
32 params.actor_context,
33 input,
34 node.base,
35 node.percentile_index as usize,
36 params.env.config().developer.chunk_size,
37 )
38 .boxed();
39 Ok(Executor::new(params.info, exec))
40 }
41}