risingwave_pb/
stream_plan.rs

1// This file is @generated by prost-build.
2#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Dispatchers {
5    #[prost(message, repeated, tag = "1")]
6    pub dispatchers: ::prost::alloc::vec::Vec<Dispatcher>,
7}
8#[derive(prost_helpers::AnyPB)]
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct AddMutation {
11    /// New dispatchers for each actor.
12    #[prost(map = "uint32, message", tag = "1")]
13    pub actor_dispatchers: ::std::collections::HashMap<u32, Dispatchers>,
14    /// All actors to be added (to the main connected component of the graph) in this update.
15    #[prost(uint32, repeated, tag = "3")]
16    pub added_actors: ::prost::alloc::vec::Vec<u32>,
17    /// We may embed a source change split mutation here.
18    /// `Source` and `SourceBackfill` are handled together here.
19    /// TODO: we may allow multiple mutations in a single barrier.
20    #[prost(map = "uint32, message", tag = "2")]
21    pub actor_splits: ::std::collections::HashMap<u32, super::source::ConnectorSplits>,
22    /// We may embed a pause mutation here.
23    /// TODO: we may allow multiple mutations in a single barrier.
24    #[prost(bool, tag = "4")]
25    pub pause: bool,
26    #[prost(message, repeated, tag = "5")]
27    pub subscriptions_to_add: ::prost::alloc::vec::Vec<SubscriptionUpstreamInfo>,
28    /// nodes which should be paused initially.
29    #[prost(uint32, repeated, tag = "6")]
30    pub backfill_nodes_to_pause: ::prost::alloc::vec::Vec<u32>,
31}
32#[derive(prost_helpers::AnyPB)]
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct StopMutation {
35    #[prost(uint32, repeated, tag = "1")]
36    pub actors: ::prost::alloc::vec::Vec<u32>,
37}
38#[derive(prost_helpers::AnyPB)]
39#[derive(Clone, PartialEq, ::prost::Message)]
40pub struct UpdateMutation {
41    /// Dispatcher updates.
42    #[prost(message, repeated, tag = "1")]
43    pub dispatcher_update: ::prost::alloc::vec::Vec<update_mutation::DispatcherUpdate>,
44    /// Merge updates.
45    #[prost(message, repeated, tag = "2")]
46    pub merge_update: ::prost::alloc::vec::Vec<update_mutation::MergeUpdate>,
47    /// Vnode bitmap updates for each actor.
48    #[prost(map = "uint32, message", tag = "3")]
49    pub actor_vnode_bitmap_update: ::std::collections::HashMap<
50        u32,
51        super::common::Buffer,
52    >,
53    /// All actors to be dropped in this update.
54    #[prost(uint32, repeated, tag = "4")]
55    pub dropped_actors: ::prost::alloc::vec::Vec<u32>,
56    /// Source updates.
57    /// `Source` and `SourceBackfill` are handled together here.
58    #[prost(map = "uint32, message", tag = "5")]
59    pub actor_splits: ::std::collections::HashMap<u32, super::source::ConnectorSplits>,
60    /// When modifying the Materialized View, we need to recreate the Dispatcher from the old upstream to the new TableFragment.
61    /// Consistent with the semantics in AddMutation.
62    #[prost(map = "uint32, message", tag = "6")]
63    pub actor_new_dispatchers: ::std::collections::HashMap<u32, Dispatchers>,
64}
65/// Nested message and enum types in `UpdateMutation`.
66pub mod update_mutation {
67    #[derive(prost_helpers::AnyPB)]
68    #[derive(Clone, PartialEq, ::prost::Message)]
69    pub struct DispatcherUpdate {
70        /// Dispatcher can be uniquely identified by a combination of actor id and dispatcher id.
71        #[prost(uint32, tag = "1")]
72        pub actor_id: u32,
73        #[prost(uint64, tag = "2")]
74        pub dispatcher_id: u64,
75        /// The hash mapping for consistent hash.
76        /// For dispatcher types other than HASH, this is ignored.
77        #[prost(message, optional, tag = "3")]
78        pub hash_mapping: ::core::option::Option<super::ActorMapping>,
79        /// Added downstream actors.
80        #[prost(uint32, repeated, tag = "4")]
81        pub added_downstream_actor_id: ::prost::alloc::vec::Vec<u32>,
82        /// Removed downstream actors.
83        #[prost(uint32, repeated, tag = "5")]
84        pub removed_downstream_actor_id: ::prost::alloc::vec::Vec<u32>,
85    }
86    #[derive(prost_helpers::AnyPB)]
87    #[derive(Clone, PartialEq, ::prost::Message)]
88    pub struct MergeUpdate {
89        /// Merge executor can be uniquely identified by a combination of actor id and upstream fragment id.
90        #[prost(uint32, tag = "1")]
91        pub actor_id: u32,
92        #[prost(uint32, tag = "2")]
93        pub upstream_fragment_id: u32,
94        /// - For scaling, this is always `None`.
95        /// - For plan change, the upstream fragment will be changed to a new one, and this will be `Some`.
96        ///    In this case, all the upstream actors should be removed and replaced by the `new` ones.
97        #[prost(uint32, optional, tag = "5")]
98        pub new_upstream_fragment_id: ::core::option::Option<u32>,
99        /// Added upstream actors.
100        #[prost(message, repeated, tag = "3")]
101        pub added_upstream_actors: ::prost::alloc::vec::Vec<
102            super::super::common::ActorInfo,
103        >,
104        /// Removed upstream actors.
105        /// Note: this is empty for replace job.
106        #[prost(uint32, repeated, tag = "4")]
107        pub removed_upstream_actor_id: ::prost::alloc::vec::Vec<u32>,
108    }
109}
110#[derive(prost_helpers::AnyPB)]
111#[derive(Clone, PartialEq, ::prost::Message)]
112pub struct SourceChangeSplitMutation {
113    /// `Source` and `SourceBackfill` are handled together here.
114    #[prost(map = "uint32, message", tag = "2")]
115    pub actor_splits: ::std::collections::HashMap<u32, super::source::ConnectorSplits>,
116}
117#[derive(prost_helpers::AnyPB)]
118#[derive(Clone, Copy, PartialEq, ::prost::Message)]
119pub struct PauseMutation {}
120#[derive(prost_helpers::AnyPB)]
121#[derive(Clone, Copy, PartialEq, ::prost::Message)]
122pub struct ResumeMutation {}
123#[derive(prost_helpers::AnyPB)]
124#[derive(Clone, PartialEq, ::prost::Message)]
125pub struct ThrottleMutation {
126    #[prost(map = "uint32, message", tag = "1")]
127    pub actor_throttle: ::std::collections::HashMap<u32, throttle_mutation::RateLimit>,
128}
129/// Nested message and enum types in `ThrottleMutation`.
130pub mod throttle_mutation {
131    #[derive(prost_helpers::AnyPB)]
132    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
133    pub struct RateLimit {
134        #[prost(uint32, optional, tag = "1")]
135        pub rate_limit: ::core::option::Option<u32>,
136    }
137}
138#[derive(prost_helpers::AnyPB)]
139#[derive(Clone, PartialEq, ::prost::Message)]
140pub struct CombinedMutation {
141    #[prost(message, repeated, tag = "1")]
142    pub mutations: ::prost::alloc::vec::Vec<BarrierMutation>,
143}
144#[derive(prost_helpers::AnyPB)]
145#[derive(Clone, Copy, PartialEq, ::prost::Message)]
146pub struct SubscriptionUpstreamInfo {
147    /// can either be subscription_id or table_id of creating TableFragments
148    #[prost(uint32, tag = "1")]
149    pub subscriber_id: u32,
150    #[prost(uint32, tag = "2")]
151    pub upstream_mv_table_id: u32,
152}
153#[derive(prost_helpers::AnyPB)]
154#[derive(Clone, PartialEq, ::prost::Message)]
155pub struct DropSubscriptionsMutation {
156    #[prost(message, repeated, tag = "1")]
157    pub info: ::prost::alloc::vec::Vec<SubscriptionUpstreamInfo>,
158}
159#[derive(prost_helpers::AnyPB)]
160#[derive(Clone, PartialEq, ::prost::Message)]
161pub struct ConnectorPropsChangeMutation {
162    #[prost(map = "uint32, message", tag = "1")]
163    pub connector_props_infos: ::std::collections::HashMap<
164        u32,
165        connector_props_change_mutation::ConnectorPropsInfo,
166    >,
167}
168/// Nested message and enum types in `ConnectorPropsChangeMutation`.
169pub mod connector_props_change_mutation {
170    #[derive(prost_helpers::AnyPB)]
171    #[derive(Clone, PartialEq, ::prost::Message)]
172    pub struct ConnectorPropsInfo {
173        #[prost(map = "string, string", tag = "1")]
174        pub connector_props_info: ::std::collections::HashMap<
175            ::prost::alloc::string::String,
176            ::prost::alloc::string::String,
177        >,
178    }
179}
180#[derive(prost_helpers::AnyPB)]
181#[derive(Clone, PartialEq, ::prost::Message)]
182pub struct StartFragmentBackfillMutation {
183    #[prost(uint32, repeated, tag = "1")]
184    pub fragment_ids: ::prost::alloc::vec::Vec<u32>,
185}
186#[derive(prost_helpers::AnyPB)]
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct BarrierMutation {
189    #[prost(
190        oneof = "barrier_mutation::Mutation",
191        tags = "3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 100"
192    )]
193    pub mutation: ::core::option::Option<barrier_mutation::Mutation>,
194}
195/// Nested message and enum types in `BarrierMutation`.
196pub mod barrier_mutation {
197    #[derive(prost_helpers::AnyPB)]
198    #[derive(Clone, PartialEq, ::prost::Oneof)]
199    pub enum Mutation {
200        /// Add new dispatchers to some actors, used for creating materialized views.
201        #[prost(message, tag = "3")]
202        Add(super::AddMutation),
203        /// Stop a set of actors, used for dropping materialized views. Empty dispatchers will be
204        /// automatically removed.
205        #[prost(message, tag = "4")]
206        Stop(super::StopMutation),
207        /// Update outputs and hash mappings for some dispatchers, used for scaling and replace table.
208        #[prost(message, tag = "5")]
209        Update(super::UpdateMutation),
210        /// Change the split of some sources.
211        #[prost(message, tag = "6")]
212        Splits(super::SourceChangeSplitMutation),
213        /// Pause the dataflow of the whole streaming graph, only used for scaling.
214        #[prost(message, tag = "7")]
215        Pause(super::PauseMutation),
216        /// Resume the dataflow of the whole streaming graph, only used for scaling.
217        #[prost(message, tag = "8")]
218        Resume(super::ResumeMutation),
219        /// Throttle specific source exec or backfill exec.
220        #[prost(message, tag = "10")]
221        Throttle(super::ThrottleMutation),
222        /// Drop subscription on mv
223        #[prost(message, tag = "12")]
224        DropSubscriptions(super::DropSubscriptionsMutation),
225        /// Alter sink/connector/source props
226        #[prost(message, tag = "13")]
227        ConnectorPropsChange(super::ConnectorPropsChangeMutation),
228        /// Start backfilling for specific fragments
229        /// This is separated from `ThrottleMutation::NO_RATE_LIMIT`.
230        /// This is because user may concurrently rate limit + use backfill order control.
231        /// If we use rate limit to pause / resume backfill fragments, if user manually
232        /// resumes some fragments, this will overwrite the backfill order configuration.
233        #[prost(message, tag = "14")]
234        StartFragmentBackfill(super::StartFragmentBackfillMutation),
235        /// Combined mutation.
236        /// Currently, it can only be Add & Update, which is for sink into table.
237        #[prost(message, tag = "100")]
238        Combined(super::CombinedMutation),
239    }
240}
241#[derive(prost_helpers::AnyPB)]
242#[derive(Clone, PartialEq, ::prost::Message)]
243pub struct Barrier {
244    #[prost(message, optional, tag = "1")]
245    pub epoch: ::core::option::Option<super::data::Epoch>,
246    #[prost(message, optional, tag = "3")]
247    pub mutation: ::core::option::Option<BarrierMutation>,
248    /// Used for tracing.
249    #[prost(map = "string, string", tag = "2")]
250    pub tracing_context: ::std::collections::HashMap<
251        ::prost::alloc::string::String,
252        ::prost::alloc::string::String,
253    >,
254    /// The kind of the barrier.
255    #[prost(enumeration = "barrier::BarrierKind", tag = "9")]
256    pub kind: i32,
257    /// Record the actors that the barrier has passed. Only used for debugging.
258    #[prost(uint32, repeated, tag = "255")]
259    pub passed_actors: ::prost::alloc::vec::Vec<u32>,
260}
261/// Nested message and enum types in `Barrier`.
262pub mod barrier {
263    #[derive(prost_helpers::AnyPB)]
264    #[derive(::enum_as_inner::EnumAsInner)]
265    #[derive(
266        Clone,
267        Copy,
268        Debug,
269        PartialEq,
270        Eq,
271        Hash,
272        PartialOrd,
273        Ord,
274        ::prost::Enumeration
275    )]
276    #[repr(i32)]
277    pub enum BarrierKind {
278        Unspecified = 0,
279        /// The first barrier after a fresh start or recovery.
280        /// There will be no data associated with the previous epoch of the barrier.
281        Initial = 1,
282        /// A normal barrier. Data should be flushed locally.
283        Barrier = 2,
284        /// A checkpoint barrier. Data should be synchorized to the shared storage.
285        Checkpoint = 3,
286    }
287    impl BarrierKind {
288        /// String value of the enum field names used in the ProtoBuf definition.
289        ///
290        /// The values are not transformed in any way and thus are considered stable
291        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
292        pub fn as_str_name(&self) -> &'static str {
293            match self {
294                Self::Unspecified => "BARRIER_KIND_UNSPECIFIED",
295                Self::Initial => "BARRIER_KIND_INITIAL",
296                Self::Barrier => "BARRIER_KIND_BARRIER",
297                Self::Checkpoint => "BARRIER_KIND_CHECKPOINT",
298            }
299        }
300        /// Creates an enum from field names used in the ProtoBuf definition.
301        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
302            match value {
303                "BARRIER_KIND_UNSPECIFIED" => Some(Self::Unspecified),
304                "BARRIER_KIND_INITIAL" => Some(Self::Initial),
305                "BARRIER_KIND_BARRIER" => Some(Self::Barrier),
306                "BARRIER_KIND_CHECKPOINT" => Some(Self::Checkpoint),
307                _ => None,
308            }
309        }
310    }
311}
312#[derive(prost_helpers::AnyPB)]
313#[derive(Clone, PartialEq, ::prost::Message)]
314pub struct Watermark {
315    /// The reference to the watermark column in the stream's schema.
316    #[prost(message, optional, tag = "1")]
317    pub column: ::core::option::Option<super::expr::InputRef>,
318    /// The watermark value, there will be no record having a greater value in the watermark column.
319    #[prost(message, optional, tag = "3")]
320    pub val: ::core::option::Option<super::data::Datum>,
321}
322#[derive(prost_helpers::AnyPB)]
323#[derive(Clone, PartialEq, ::prost::Message)]
324pub struct StreamMessage {
325    #[prost(oneof = "stream_message::StreamMessage", tags = "1, 2, 3")]
326    pub stream_message: ::core::option::Option<stream_message::StreamMessage>,
327}
328/// Nested message and enum types in `StreamMessage`.
329pub mod stream_message {
330    #[derive(prost_helpers::AnyPB)]
331    #[derive(Clone, PartialEq, ::prost::Oneof)]
332    pub enum StreamMessage {
333        #[prost(message, tag = "1")]
334        StreamChunk(super::super::data::StreamChunk),
335        #[prost(message, tag = "2")]
336        Barrier(super::Barrier),
337        #[prost(message, tag = "3")]
338        Watermark(super::Watermark),
339    }
340}
341#[derive(prost_helpers::AnyPB)]
342#[derive(Clone, PartialEq, ::prost::Message)]
343pub struct StreamMessageBatch {
344    #[prost(oneof = "stream_message_batch::StreamMessageBatch", tags = "1, 2, 3")]
345    pub stream_message_batch: ::core::option::Option<
346        stream_message_batch::StreamMessageBatch,
347    >,
348}
349/// Nested message and enum types in `StreamMessageBatch`.
350pub mod stream_message_batch {
351    #[derive(prost_helpers::AnyPB)]
352    #[derive(Clone, PartialEq, ::prost::Message)]
353    pub struct BarrierBatch {
354        #[prost(message, repeated, tag = "1")]
355        pub barriers: ::prost::alloc::vec::Vec<super::Barrier>,
356    }
357    #[derive(prost_helpers::AnyPB)]
358    #[derive(Clone, PartialEq, ::prost::Oneof)]
359    pub enum StreamMessageBatch {
360        #[prost(message, tag = "1")]
361        StreamChunk(super::super::data::StreamChunk),
362        #[prost(message, tag = "2")]
363        BarrierBatch(BarrierBatch),
364        #[prost(message, tag = "3")]
365        Watermark(super::Watermark),
366    }
367}
368/// Hash mapping for compute node. Stores mapping from virtual node to actor id.
369#[derive(prost_helpers::AnyPB)]
370#[derive(Clone, PartialEq, ::prost::Message)]
371pub struct ActorMapping {
372    #[prost(uint32, repeated, tag = "1")]
373    pub original_indices: ::prost::alloc::vec::Vec<u32>,
374    #[prost(uint32, repeated, tag = "2")]
375    pub data: ::prost::alloc::vec::Vec<u32>,
376}
377#[derive(prost_helpers::AnyPB)]
378#[derive(Clone, PartialEq, ::prost::Message)]
379pub struct StreamSource {
380    #[prost(uint32, tag = "1")]
381    pub source_id: u32,
382    #[prost(message, optional, tag = "2")]
383    pub state_table: ::core::option::Option<super::catalog::Table>,
384    #[prost(uint32, optional, tag = "3")]
385    pub row_id_index: ::core::option::Option<u32>,
386    #[prost(message, repeated, tag = "4")]
387    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
388    #[prost(btree_map = "string, string", tag = "6")]
389    pub with_properties: ::prost::alloc::collections::BTreeMap<
390        ::prost::alloc::string::String,
391        ::prost::alloc::string::String,
392    >,
393    #[prost(message, optional, tag = "7")]
394    pub info: ::core::option::Option<super::catalog::StreamSourceInfo>,
395    #[prost(string, tag = "8")]
396    pub source_name: ::prost::alloc::string::String,
397    /// Source rate limit
398    #[prost(uint32, optional, tag = "9")]
399    pub rate_limit: ::core::option::Option<u32>,
400    #[prost(btree_map = "string, message", tag = "10")]
401    pub secret_refs: ::prost::alloc::collections::BTreeMap<
402        ::prost::alloc::string::String,
403        super::secret::SecretRef,
404    >,
405}
406/// copy contents from StreamSource to prevent compatibility issues in the future
407#[derive(prost_helpers::AnyPB)]
408#[derive(Clone, PartialEq, ::prost::Message)]
409pub struct StreamFsFetch {
410    #[prost(uint32, tag = "1")]
411    pub source_id: u32,
412    #[prost(message, optional, tag = "2")]
413    pub state_table: ::core::option::Option<super::catalog::Table>,
414    #[prost(uint32, optional, tag = "3")]
415    pub row_id_index: ::core::option::Option<u32>,
416    #[prost(message, repeated, tag = "4")]
417    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
418    #[prost(btree_map = "string, string", tag = "6")]
419    pub with_properties: ::prost::alloc::collections::BTreeMap<
420        ::prost::alloc::string::String,
421        ::prost::alloc::string::String,
422    >,
423    #[prost(message, optional, tag = "7")]
424    pub info: ::core::option::Option<super::catalog::StreamSourceInfo>,
425    #[prost(string, tag = "8")]
426    pub source_name: ::prost::alloc::string::String,
427    /// Source rate limit
428    #[prost(uint32, optional, tag = "9")]
429    pub rate_limit: ::core::option::Option<u32>,
430    #[prost(btree_map = "string, message", tag = "10")]
431    pub secret_refs: ::prost::alloc::collections::BTreeMap<
432        ::prost::alloc::string::String,
433        super::secret::SecretRef,
434    >,
435}
436/// The executor only for receiving barrier from the meta service. It always resides in the leaves
437/// of the streaming graph.
438#[derive(prost_helpers::AnyPB)]
439#[derive(Clone, Copy, PartialEq, ::prost::Message)]
440pub struct BarrierRecvNode {}
441#[derive(prost_helpers::AnyPB)]
442#[derive(Clone, PartialEq, ::prost::Message)]
443pub struct SourceNode {
444    /// The source node can contain either a stream source or nothing. So here we extract all
445    /// information about stream source to a message, and here it will be an `Option` in Rust.
446    #[prost(message, optional, tag = "1")]
447    pub source_inner: ::core::option::Option<StreamSource>,
448}
449#[derive(prost_helpers::AnyPB)]
450#[derive(Clone, PartialEq, ::prost::Message)]
451pub struct StreamFsFetchNode {
452    #[prost(message, optional, tag = "1")]
453    pub node_inner: ::core::option::Option<StreamFsFetch>,
454}
455/// / It's input must be a `MergeNode`, which connects to the upstream source job.
456/// / See `StreamSourceScan::adhoc_to_stream_prost` for the plan.
457#[derive(prost_helpers::AnyPB)]
458#[derive(Clone, PartialEq, ::prost::Message)]
459pub struct SourceBackfillNode {
460    #[prost(uint32, tag = "1")]
461    pub upstream_source_id: u32,
462    #[prost(uint32, optional, tag = "2")]
463    pub row_id_index: ::core::option::Option<u32>,
464    #[prost(message, repeated, tag = "3")]
465    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
466    #[prost(message, optional, tag = "4")]
467    pub info: ::core::option::Option<super::catalog::StreamSourceInfo>,
468    #[prost(string, tag = "5")]
469    pub source_name: ::prost::alloc::string::String,
470    #[prost(btree_map = "string, string", tag = "6")]
471    pub with_properties: ::prost::alloc::collections::BTreeMap<
472        ::prost::alloc::string::String,
473        ::prost::alloc::string::String,
474    >,
475    /// Backfill rate limit
476    #[prost(uint32, optional, tag = "7")]
477    pub rate_limit: ::core::option::Option<u32>,
478    /// `| partition_id | backfill_progress |`
479    #[prost(message, optional, tag = "8")]
480    pub state_table: ::core::option::Option<super::catalog::Table>,
481    #[prost(btree_map = "string, message", tag = "9")]
482    pub secret_refs: ::prost::alloc::collections::BTreeMap<
483        ::prost::alloc::string::String,
484        super::secret::SecretRef,
485    >,
486}
487#[derive(prost_helpers::AnyPB)]
488#[derive(Clone, PartialEq, ::prost::Message)]
489pub struct SinkDesc {
490    #[prost(uint32, tag = "1")]
491    pub id: u32,
492    #[prost(string, tag = "2")]
493    pub name: ::prost::alloc::string::String,
494    #[prost(string, tag = "3")]
495    pub definition: ::prost::alloc::string::String,
496    #[prost(message, repeated, tag = "5")]
497    pub plan_pk: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
498    #[prost(uint32, repeated, tag = "6")]
499    pub downstream_pk: ::prost::alloc::vec::Vec<u32>,
500    #[prost(uint32, repeated, tag = "7")]
501    pub distribution_key: ::prost::alloc::vec::Vec<u32>,
502    #[prost(btree_map = "string, string", tag = "8")]
503    pub properties: ::prost::alloc::collections::BTreeMap<
504        ::prost::alloc::string::String,
505        ::prost::alloc::string::String,
506    >,
507    /// to be deprecated
508    #[prost(enumeration = "super::catalog::SinkType", tag = "9")]
509    pub sink_type: i32,
510    #[prost(message, repeated, tag = "10")]
511    pub column_catalogs: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
512    #[prost(string, tag = "11")]
513    pub db_name: ::prost::alloc::string::String,
514    /// If the sink is from table or mv, this is name of the table/mv. Otherwise
515    /// it is the name of the sink itself.
516    #[prost(string, tag = "12")]
517    pub sink_from_name: ::prost::alloc::string::String,
518    #[prost(message, optional, tag = "13")]
519    pub format_desc: ::core::option::Option<super::catalog::SinkFormatDesc>,
520    #[prost(uint32, optional, tag = "14")]
521    pub target_table: ::core::option::Option<u32>,
522    #[prost(uint64, optional, tag = "15")]
523    pub extra_partition_col_idx: ::core::option::Option<u64>,
524    #[prost(btree_map = "string, message", tag = "16")]
525    pub secret_refs: ::prost::alloc::collections::BTreeMap<
526        ::prost::alloc::string::String,
527        super::secret::SecretRef,
528    >,
529}
530#[derive(prost_helpers::AnyPB)]
531#[derive(Clone, PartialEq, ::prost::Message)]
532pub struct SinkNode {
533    #[prost(message, optional, tag = "1")]
534    pub sink_desc: ::core::option::Option<SinkDesc>,
535    /// A sink with a kv log store should have a table.
536    #[prost(message, optional, tag = "2")]
537    pub table: ::core::option::Option<super::catalog::Table>,
538    #[prost(enumeration = "SinkLogStoreType", tag = "3")]
539    pub log_store_type: i32,
540    #[prost(uint32, optional, tag = "4")]
541    pub rate_limit: ::core::option::Option<u32>,
542}
543#[derive(prost_helpers::AnyPB)]
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct ProjectNode {
546    #[prost(message, repeated, tag = "1")]
547    pub select_list: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
548    /// this two field is expressing a list of usize pair, which means when project receives a
549    /// watermark with `watermark_input_cols\[i\]` column index, it should derive a new watermark
550    /// with `watermark_output_cols\[i\]`th expression
551    #[prost(uint32, repeated, tag = "2")]
552    pub watermark_input_cols: ::prost::alloc::vec::Vec<u32>,
553    #[prost(uint32, repeated, tag = "3")]
554    pub watermark_output_cols: ::prost::alloc::vec::Vec<u32>,
555    #[prost(uint32, repeated, tag = "4")]
556    pub nondecreasing_exprs: ::prost::alloc::vec::Vec<u32>,
557    /// Whether there are likely no-op updates in the output chunks, so that eliminating them with
558    /// `StreamChunk::eliminate_adjacent_noop_update` could be beneficial.
559    #[prost(bool, tag = "5")]
560    pub noop_update_hint: bool,
561}
562#[derive(prost_helpers::AnyPB)]
563#[derive(Clone, PartialEq, ::prost::Message)]
564pub struct FilterNode {
565    #[prost(message, optional, tag = "1")]
566    pub search_condition: ::core::option::Option<super::expr::ExprNode>,
567}
568#[derive(prost_helpers::AnyPB)]
569#[derive(Clone, Copy, PartialEq, ::prost::Message)]
570pub struct ChangeLogNode {
571    /// Whether or not there is an op in the final output.
572    #[prost(bool, tag = "1")]
573    pub need_op: bool,
574}
575#[derive(prost_helpers::AnyPB)]
576#[derive(Clone, PartialEq, ::prost::Message)]
577pub struct CdcFilterNode {
578    #[prost(message, optional, tag = "1")]
579    pub search_condition: ::core::option::Option<super::expr::ExprNode>,
580    #[prost(uint32, tag = "2")]
581    pub upstream_source_id: u32,
582}
583/// A materialized view is regarded as a table.
584/// In addition, we also specify primary key to MV for efficient point lookup during update and deletion.
585///
586/// The node will be used for both create mv and create index.
587/// - When creating mv, `pk == distribution_key == column_orders`.
588/// - When creating index, `column_orders` will contain both
589///    arrange columns and pk columns, while distribution key will be arrange columns.
590#[derive(prost_helpers::AnyPB)]
591#[derive(Clone, PartialEq, ::prost::Message)]
592pub struct MaterializeNode {
593    #[prost(uint32, tag = "1")]
594    pub table_id: u32,
595    /// Column indexes and orders of primary key.
596    #[prost(message, repeated, tag = "2")]
597    pub column_orders: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
598    /// Used for internal table states.
599    #[prost(message, optional, tag = "3")]
600    pub table: ::core::option::Option<super::catalog::Table>,
601}
602#[derive(prost_helpers::AnyPB)]
603#[derive(Clone, PartialEq, ::prost::Message)]
604pub struct AggCallState {
605    #[prost(oneof = "agg_call_state::Inner", tags = "1, 3")]
606    pub inner: ::core::option::Option<agg_call_state::Inner>,
607}
608/// Nested message and enum types in `AggCallState`.
609pub mod agg_call_state {
610    /// the state is stored in the intermediate state table. used for count/sum/append-only extreme.
611    #[derive(prost_helpers::AnyPB)]
612    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
613    pub struct ValueState {}
614    /// use the some column of the Upstream's materialization as the AggCall's state, used for extreme/string_agg/array_agg.
615    #[derive(prost_helpers::AnyPB)]
616    #[derive(Clone, PartialEq, ::prost::Message)]
617    pub struct MaterializedInputState {
618        #[prost(message, optional, tag = "1")]
619        pub table: ::core::option::Option<super::super::catalog::Table>,
620        /// for constructing state table column mapping
621        #[prost(uint32, repeated, tag = "2")]
622        pub included_upstream_indices: ::prost::alloc::vec::Vec<u32>,
623        #[prost(uint32, repeated, tag = "3")]
624        pub table_value_indices: ::prost::alloc::vec::Vec<u32>,
625        #[prost(message, repeated, tag = "4")]
626        pub order_columns: ::prost::alloc::vec::Vec<super::super::common::ColumnOrder>,
627    }
628    #[derive(prost_helpers::AnyPB)]
629    #[derive(Clone, PartialEq, ::prost::Oneof)]
630    pub enum Inner {
631        #[prost(message, tag = "1")]
632        ValueState(ValueState),
633        #[prost(message, tag = "3")]
634        MaterializedInputState(MaterializedInputState),
635    }
636}
637#[derive(prost_helpers::AnyPB)]
638#[derive(Clone, PartialEq, ::prost::Message)]
639pub struct SimpleAggNode {
640    #[prost(message, repeated, tag = "1")]
641    pub agg_calls: ::prost::alloc::vec::Vec<super::expr::AggCall>,
642    /// Only used for stateless simple agg.
643    #[prost(uint32, repeated, tag = "2")]
644    pub distribution_key: ::prost::alloc::vec::Vec<u32>,
645    #[prost(message, repeated, tag = "3")]
646    pub agg_call_states: ::prost::alloc::vec::Vec<AggCallState>,
647    #[prost(message, optional, tag = "4")]
648    pub intermediate_state_table: ::core::option::Option<super::catalog::Table>,
649    /// Whether to optimize for append only stream.
650    /// It is true when the input is append-only
651    #[prost(bool, tag = "5")]
652    pub is_append_only: bool,
653    #[prost(map = "uint32, message", tag = "6")]
654    pub distinct_dedup_tables: ::std::collections::HashMap<u32, super::catalog::Table>,
655    #[prost(uint32, tag = "7")]
656    pub row_count_index: u32,
657    #[prost(enumeration = "AggNodeVersion", tag = "8")]
658    pub version: i32,
659    /// Required by the downstream `RowMergeNode`,
660    /// currently only used by the `approx_percentile`'s two phase plan
661    #[prost(bool, tag = "9")]
662    pub must_output_per_barrier: bool,
663}
664#[derive(prost_helpers::AnyPB)]
665#[derive(Clone, PartialEq, ::prost::Message)]
666pub struct HashAggNode {
667    #[prost(uint32, repeated, tag = "1")]
668    pub group_key: ::prost::alloc::vec::Vec<u32>,
669    #[prost(message, repeated, tag = "2")]
670    pub agg_calls: ::prost::alloc::vec::Vec<super::expr::AggCall>,
671    #[prost(message, repeated, tag = "3")]
672    pub agg_call_states: ::prost::alloc::vec::Vec<AggCallState>,
673    #[prost(message, optional, tag = "4")]
674    pub intermediate_state_table: ::core::option::Option<super::catalog::Table>,
675    /// Whether to optimize for append only stream.
676    /// It is true when the input is append-only
677    #[prost(bool, tag = "5")]
678    pub is_append_only: bool,
679    #[prost(map = "uint32, message", tag = "6")]
680    pub distinct_dedup_tables: ::std::collections::HashMap<u32, super::catalog::Table>,
681    #[prost(uint32, tag = "7")]
682    pub row_count_index: u32,
683    #[prost(bool, tag = "8")]
684    pub emit_on_window_close: bool,
685    #[prost(enumeration = "AggNodeVersion", tag = "9")]
686    pub version: i32,
687}
688#[derive(prost_helpers::AnyPB)]
689#[derive(Clone, PartialEq, ::prost::Message)]
690pub struct TopNNode {
691    /// 0 means no limit as limit of 0 means this node should be optimized away
692    #[prost(uint64, tag = "1")]
693    pub limit: u64,
694    #[prost(uint64, tag = "2")]
695    pub offset: u64,
696    #[prost(message, optional, tag = "3")]
697    pub table: ::core::option::Option<super::catalog::Table>,
698    #[prost(message, repeated, tag = "4")]
699    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
700    #[prost(bool, tag = "5")]
701    pub with_ties: bool,
702}
703#[derive(prost_helpers::AnyPB)]
704#[derive(Clone, PartialEq, ::prost::Message)]
705pub struct GroupTopNNode {
706    /// 0 means no limit as limit of 0 means this node should be optimized away
707    #[prost(uint64, tag = "1")]
708    pub limit: u64,
709    #[prost(uint64, tag = "2")]
710    pub offset: u64,
711    #[prost(uint32, repeated, tag = "3")]
712    pub group_key: ::prost::alloc::vec::Vec<u32>,
713    #[prost(message, optional, tag = "4")]
714    pub table: ::core::option::Option<super::catalog::Table>,
715    #[prost(message, repeated, tag = "5")]
716    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
717    #[prost(bool, tag = "6")]
718    pub with_ties: bool,
719}
720#[derive(prost_helpers::AnyPB)]
721#[derive(Clone, PartialEq, ::prost::Message)]
722pub struct DeltaExpression {
723    #[prost(enumeration = "super::expr::expr_node::Type", tag = "1")]
724    pub delta_type: i32,
725    #[prost(message, optional, tag = "2")]
726    pub delta: ::core::option::Option<super::expr::ExprNode>,
727}
728#[derive(prost_helpers::AnyPB)]
729#[derive(Clone, PartialEq, ::prost::Message)]
730pub struct InequalityPair {
731    /// Input index of greater side of inequality.
732    #[prost(uint32, tag = "1")]
733    pub key_required_larger: u32,
734    /// Input index of less side of inequality.
735    #[prost(uint32, tag = "2")]
736    pub key_required_smaller: u32,
737    /// Whether this condition is used to clean state table of `HashJoinExecutor`.
738    #[prost(bool, tag = "3")]
739    pub clean_state: bool,
740    /// greater >= less + delta_expression, if `None`, it represents that greater >= less
741    #[prost(message, optional, tag = "4")]
742    pub delta_expression: ::core::option::Option<DeltaExpression>,
743}
744#[derive(prost_helpers::AnyPB)]
745#[derive(Clone, PartialEq, ::prost::Message)]
746pub struct HashJoinNode {
747    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
748    pub join_type: i32,
749    #[prost(int32, repeated, tag = "2")]
750    pub left_key: ::prost::alloc::vec::Vec<i32>,
751    #[prost(int32, repeated, tag = "3")]
752    pub right_key: ::prost::alloc::vec::Vec<i32>,
753    #[prost(message, optional, tag = "4")]
754    pub condition: ::core::option::Option<super::expr::ExprNode>,
755    #[prost(message, repeated, tag = "5")]
756    pub inequality_pairs: ::prost::alloc::vec::Vec<InequalityPair>,
757    /// Used for internal table states.
758    #[prost(message, optional, tag = "6")]
759    pub left_table: ::core::option::Option<super::catalog::Table>,
760    /// Used for internal table states.
761    #[prost(message, optional, tag = "7")]
762    pub right_table: ::core::option::Option<super::catalog::Table>,
763    /// Used for internal table states.
764    #[prost(message, optional, tag = "8")]
765    pub left_degree_table: ::core::option::Option<super::catalog::Table>,
766    /// Used for internal table states.
767    #[prost(message, optional, tag = "9")]
768    pub right_degree_table: ::core::option::Option<super::catalog::Table>,
769    /// The output indices of current node
770    #[prost(uint32, repeated, tag = "10")]
771    pub output_indices: ::prost::alloc::vec::Vec<u32>,
772    /// Left deduped input pk indices. The pk of the left_table and
773    /// left_degree_table is  \[left_join_key | left_deduped_input_pk_indices\]
774    /// and is expected to be the shortest key which starts with
775    /// the join key and satisfies unique constrain.
776    #[prost(uint32, repeated, tag = "11")]
777    pub left_deduped_input_pk_indices: ::prost::alloc::vec::Vec<u32>,
778    /// Right deduped input pk indices. The pk of the right_table and
779    /// right_degree_table is  \[right_join_key | right_deduped_input_pk_indices\]
780    /// and is expected to be the shortest key which starts with
781    /// the join key and satisfies unique constrain.
782    #[prost(uint32, repeated, tag = "12")]
783    pub right_deduped_input_pk_indices: ::prost::alloc::vec::Vec<u32>,
784    #[prost(bool, repeated, tag = "13")]
785    pub null_safe: ::prost::alloc::vec::Vec<bool>,
786    /// Whether to optimize for append only stream.
787    /// It is true when the input is append-only
788    #[prost(bool, tag = "14")]
789    pub is_append_only: bool,
790    /// Which encoding will be used to encode join rows in operator cache.
791    #[prost(enumeration = "JoinEncodingType", tag = "15")]
792    pub join_encoding_type: i32,
793}
794#[derive(prost_helpers::AnyPB)]
795#[derive(Clone, PartialEq, ::prost::Message)]
796pub struct AsOfJoinNode {
797    #[prost(enumeration = "super::plan_common::AsOfJoinType", tag = "1")]
798    pub join_type: i32,
799    #[prost(int32, repeated, tag = "2")]
800    pub left_key: ::prost::alloc::vec::Vec<i32>,
801    #[prost(int32, repeated, tag = "3")]
802    pub right_key: ::prost::alloc::vec::Vec<i32>,
803    /// Used for internal table states.
804    #[prost(message, optional, tag = "4")]
805    pub left_table: ::core::option::Option<super::catalog::Table>,
806    /// Used for internal table states.
807    #[prost(message, optional, tag = "5")]
808    pub right_table: ::core::option::Option<super::catalog::Table>,
809    /// The output indices of current node
810    #[prost(uint32, repeated, tag = "6")]
811    pub output_indices: ::prost::alloc::vec::Vec<u32>,
812    /// Left deduped input pk indices. The pk of the left_table and
813    /// The pk of the left_table is  \[left_join_key | left_inequality_key | left_deduped_input_pk_indices\]
814    /// left_inequality_key is not used but for forward compatibility.
815    #[prost(uint32, repeated, tag = "7")]
816    pub left_deduped_input_pk_indices: ::prost::alloc::vec::Vec<u32>,
817    /// Right deduped input pk indices.
818    /// The pk of the right_table is  \[right_join_key | right_inequality_key | right_deduped_input_pk_indices\]
819    /// right_inequality_key is not used but for forward compatibility.
820    #[prost(uint32, repeated, tag = "8")]
821    pub right_deduped_input_pk_indices: ::prost::alloc::vec::Vec<u32>,
822    #[prost(bool, repeated, tag = "9")]
823    pub null_safe: ::prost::alloc::vec::Vec<bool>,
824    #[prost(message, optional, tag = "10")]
825    pub asof_desc: ::core::option::Option<super::plan_common::AsOfJoinDesc>,
826    /// Which encoding will be used to encode join rows in operator cache.
827    #[prost(enumeration = "JoinEncodingType", tag = "11")]
828    pub join_encoding_type: i32,
829}
830#[derive(prost_helpers::AnyPB)]
831#[derive(Clone, PartialEq, ::prost::Message)]
832pub struct TemporalJoinNode {
833    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
834    pub join_type: i32,
835    #[prost(int32, repeated, tag = "2")]
836    pub left_key: ::prost::alloc::vec::Vec<i32>,
837    #[prost(int32, repeated, tag = "3")]
838    pub right_key: ::prost::alloc::vec::Vec<i32>,
839    #[prost(bool, repeated, tag = "4")]
840    pub null_safe: ::prost::alloc::vec::Vec<bool>,
841    #[prost(message, optional, tag = "5")]
842    pub condition: ::core::option::Option<super::expr::ExprNode>,
843    /// The output indices of current node
844    #[prost(uint32, repeated, tag = "6")]
845    pub output_indices: ::prost::alloc::vec::Vec<u32>,
846    /// The table desc of the lookup side table.
847    #[prost(message, optional, tag = "7")]
848    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
849    /// The output indices of the lookup side table
850    #[prost(uint32, repeated, tag = "8")]
851    pub table_output_indices: ::prost::alloc::vec::Vec<u32>,
852    /// The state table used for non-append-only temporal join.
853    #[prost(message, optional, tag = "9")]
854    pub memo_table: ::core::option::Option<super::catalog::Table>,
855    /// If it is a nested lool temporal join
856    #[prost(bool, tag = "10")]
857    pub is_nested_loop: bool,
858}
859#[derive(prost_helpers::AnyPB)]
860#[derive(Clone, PartialEq, ::prost::Message)]
861pub struct DynamicFilterNode {
862    #[prost(uint32, tag = "1")]
863    pub left_key: u32,
864    /// Must be one of <, <=, >, >=
865    #[prost(message, optional, tag = "2")]
866    pub condition: ::core::option::Option<super::expr::ExprNode>,
867    /// Left table stores all states with predicate possibly not NULL.
868    #[prost(message, optional, tag = "3")]
869    pub left_table: ::core::option::Option<super::catalog::Table>,
870    /// Right table stores single value from RHS of predicate.
871    #[prost(message, optional, tag = "4")]
872    pub right_table: ::core::option::Option<super::catalog::Table>,
873    /// If the right side's change always make the condition more relaxed.
874    /// In other words, make more record in the left side satisfy the condition.
875    /// If this is true, we need to store LHS records which do not match the condition in the internal table.
876    /// When the condition changes, we will tell downstream to insert the LHS records which now match the condition.
877    /// If this is false, we need to store RHS records which match the condition in the internal table.
878    /// When the condition changes, we will tell downstream to delete the LHS records which now no longer match the condition.
879    #[deprecated]
880    #[prost(bool, tag = "5")]
881    pub condition_always_relax: bool,
882}
883/// Delta join with two indexes. This is a pseudo plan node generated on frontend. On meta
884/// service, it will be rewritten into lookup joins.
885#[derive(prost_helpers::AnyPB)]
886#[derive(Clone, PartialEq, ::prost::Message)]
887pub struct DeltaIndexJoinNode {
888    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
889    pub join_type: i32,
890    #[prost(int32, repeated, tag = "2")]
891    pub left_key: ::prost::alloc::vec::Vec<i32>,
892    #[prost(int32, repeated, tag = "3")]
893    pub right_key: ::prost::alloc::vec::Vec<i32>,
894    #[prost(message, optional, tag = "4")]
895    pub condition: ::core::option::Option<super::expr::ExprNode>,
896    /// Table id of the left index.
897    #[prost(uint32, tag = "7")]
898    pub left_table_id: u32,
899    /// Table id of the right index.
900    #[prost(uint32, tag = "8")]
901    pub right_table_id: u32,
902    /// Info about the left index
903    #[prost(message, optional, tag = "9")]
904    pub left_info: ::core::option::Option<ArrangementInfo>,
905    /// Info about the right index
906    #[prost(message, optional, tag = "10")]
907    pub right_info: ::core::option::Option<ArrangementInfo>,
908    /// the output indices of current node
909    #[prost(uint32, repeated, tag = "11")]
910    pub output_indices: ::prost::alloc::vec::Vec<u32>,
911}
912#[derive(prost_helpers::AnyPB)]
913#[derive(Clone, PartialEq, ::prost::Message)]
914pub struct HopWindowNode {
915    #[prost(uint32, tag = "1")]
916    pub time_col: u32,
917    #[prost(message, optional, tag = "2")]
918    pub window_slide: ::core::option::Option<super::data::Interval>,
919    #[prost(message, optional, tag = "3")]
920    pub window_size: ::core::option::Option<super::data::Interval>,
921    #[prost(uint32, repeated, tag = "4")]
922    pub output_indices: ::prost::alloc::vec::Vec<u32>,
923    #[prost(message, repeated, tag = "5")]
924    pub window_start_exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
925    #[prost(message, repeated, tag = "6")]
926    pub window_end_exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
927}
928#[derive(prost_helpers::AnyPB)]
929#[derive(Clone, PartialEq, ::prost::Message)]
930pub struct MergeNode {
931    /// **WARNING**: Use this field with caution.
932    ///
933    /// `upstream_actor_id` stored in the plan node in `Fragment` meta model cannot be directly used.
934    /// See `compose_fragment`.
935    /// The field is deprecated because the upstream actor info is provided separately instead of
936    /// injected here in the node.
937    #[deprecated]
938    #[prost(uint32, repeated, packed = "false", tag = "1")]
939    pub upstream_actor_id: ::prost::alloc::vec::Vec<u32>,
940    #[prost(uint32, tag = "2")]
941    pub upstream_fragment_id: u32,
942    /// Type of the upstream dispatcher. If there's always one upstream according to this
943    /// type, the compute node may use the `ReceiverExecutor` as an optimization.
944    #[prost(enumeration = "DispatcherType", tag = "3")]
945    pub upstream_dispatcher_type: i32,
946    /// The schema of input columns. Already deprecated.
947    #[deprecated]
948    #[prost(message, repeated, tag = "4")]
949    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
950}
951/// passed from frontend to meta, used by fragmenter to generate `MergeNode`
952/// and maybe `DispatcherNode` later.
953#[derive(prost_helpers::AnyPB)]
954#[derive(Clone, PartialEq, ::prost::Message)]
955pub struct ExchangeNode {
956    #[prost(message, optional, tag = "1")]
957    pub strategy: ::core::option::Option<DispatchStrategy>,
958}
959/// StreamScanNode reads data from upstream table first, and then pass all events to downstream.
960/// It always these 2 inputs in the following order:
961/// 1. A MergeNode (as a placeholder) of upstream.
962/// 2. A BatchPlanNode for the snapshot read.
963#[derive(prost_helpers::AnyPB)]
964#[derive(Clone, PartialEq, ::prost::Message)]
965pub struct StreamScanNode {
966    #[prost(uint32, tag = "1")]
967    pub table_id: u32,
968    /// The columns from the upstream table that'll be internally required by this stream scan node.
969    /// - For non-backfill stream scan node, it's the same as the output columns.
970    /// - For backfill stream scan node, there're additionally primary key columns.
971    #[prost(int32, repeated, tag = "2")]
972    pub upstream_column_ids: ::prost::alloc::vec::Vec<i32>,
973    /// The columns to be output by this stream scan node. The index is based on the internal required columns.
974    /// - For non-backfill stream scan node, it's simply all the columns.
975    /// - For backfill stream scan node, this strips the primary key columns if they're unnecessary.
976    #[prost(uint32, repeated, tag = "3")]
977    pub output_indices: ::prost::alloc::vec::Vec<u32>,
978    /// Generally, the barrier needs to be rearranged during the MV creation process, so that data can
979    /// be flushed to shared buffer periodically, instead of making the first epoch from batch query extra
980    /// large. However, in some cases, e.g., shared state, the barrier cannot be rearranged in StreamScanNode.
981    /// StreamScanType is used to decide which implementation for the StreamScanNode.
982    #[prost(enumeration = "StreamScanType", tag = "4")]
983    pub stream_scan_type: i32,
984    /// / The state table used by Backfill operator for persisting internal state
985    #[prost(message, optional, tag = "5")]
986    pub state_table: ::core::option::Option<super::catalog::Table>,
987    /// The upstream materialized view info used by backfill.
988    /// Used iff `ChainType::Backfill`.
989    #[prost(message, optional, tag = "7")]
990    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
991    /// The backfill rate limit for the stream scan node.
992    #[prost(uint32, optional, tag = "8")]
993    pub rate_limit: ::core::option::Option<u32>,
994    /// Snapshot read every N barriers
995    #[deprecated]
996    #[prost(uint32, tag = "9")]
997    pub snapshot_read_barrier_interval: u32,
998    /// The state table used by ArrangementBackfill to replicate upstream mview's state table.
999    /// Used iff `ChainType::ArrangementBackfill`.
1000    #[prost(message, optional, tag = "10")]
1001    pub arrangement_table: ::core::option::Option<super::catalog::Table>,
1002    #[prost(uint64, optional, tag = "11")]
1003    pub snapshot_backfill_epoch: ::core::option::Option<u64>,
1004}
1005/// Config options for CDC backfill
1006#[derive(prost_helpers::AnyPB)]
1007#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1008pub struct StreamCdcScanOptions {
1009    /// Whether skip the backfill and only consume from upstream.
1010    #[prost(bool, tag = "1")]
1011    pub disable_backfill: bool,
1012    #[prost(uint32, tag = "2")]
1013    pub snapshot_barrier_interval: u32,
1014    #[prost(uint32, tag = "3")]
1015    pub snapshot_batch_size: u32,
1016}
1017#[derive(prost_helpers::AnyPB)]
1018#[derive(Clone, PartialEq, ::prost::Message)]
1019pub struct StreamCdcScanNode {
1020    #[prost(uint32, tag = "1")]
1021    pub table_id: u32,
1022    /// The columns from the upstream table that'll be internally required by this stream scan node.
1023    /// Contains Primary Keys and Output columns.
1024    #[prost(int32, repeated, tag = "2")]
1025    pub upstream_column_ids: ::prost::alloc::vec::Vec<i32>,
1026    /// Strips the primary key columns if they're unnecessary.
1027    #[prost(uint32, repeated, tag = "3")]
1028    pub output_indices: ::prost::alloc::vec::Vec<u32>,
1029    /// The state table used by CdcBackfill operator for persisting internal state
1030    #[prost(message, optional, tag = "4")]
1031    pub state_table: ::core::option::Option<super::catalog::Table>,
1032    /// The external table that will be backfilled for CDC.
1033    #[prost(message, optional, tag = "5")]
1034    pub cdc_table_desc: ::core::option::Option<super::plan_common::ExternalTableDesc>,
1035    /// The backfill rate limit for the stream cdc scan node.
1036    #[prost(uint32, optional, tag = "6")]
1037    pub rate_limit: ::core::option::Option<u32>,
1038    /// Whether skip the backfill and only consume from upstream.
1039    /// keep it for backward compatibility, new stream plan will use `options.disable_backfill`
1040    #[prost(bool, tag = "7")]
1041    pub disable_backfill: bool,
1042    #[prost(message, optional, tag = "8")]
1043    pub options: ::core::option::Option<StreamCdcScanOptions>,
1044}
1045/// BatchPlanNode is used for mv on mv snapshot read.
1046/// BatchPlanNode is supposed to carry a batch plan that can be optimized with the streaming plan_common.
1047/// Currently, streaming to batch push down is not yet supported, BatchPlanNode is simply a table scan.
1048#[derive(prost_helpers::AnyPB)]
1049#[derive(Clone, PartialEq, ::prost::Message)]
1050pub struct BatchPlanNode {
1051    #[prost(message, optional, tag = "1")]
1052    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
1053    #[prost(int32, repeated, tag = "2")]
1054    pub column_ids: ::prost::alloc::vec::Vec<i32>,
1055}
1056#[derive(prost_helpers::AnyPB)]
1057#[derive(Clone, PartialEq, ::prost::Message)]
1058pub struct ArrangementInfo {
1059    /// Order key of the arrangement, including order by columns and pk from the materialize
1060    /// executor.
1061    #[prost(message, repeated, tag = "1")]
1062    pub arrange_key_orders: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1063    /// Column descs of the arrangement
1064    #[prost(message, repeated, tag = "2")]
1065    pub column_descs: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
1066    /// Used to build storage table by stream lookup join of delta join.
1067    #[prost(message, optional, tag = "4")]
1068    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
1069    /// Output index columns
1070    #[prost(uint32, repeated, tag = "5")]
1071    pub output_col_idx: ::prost::alloc::vec::Vec<u32>,
1072}
1073/// Special node for shared state, which will only be produced in fragmenter. ArrangeNode will
1074/// produce a special Materialize executor, which materializes data for downstream to query.
1075#[derive(prost_helpers::AnyPB)]
1076#[derive(Clone, PartialEq, ::prost::Message)]
1077pub struct ArrangeNode {
1078    /// Info about the arrangement
1079    #[prost(message, optional, tag = "1")]
1080    pub table_info: ::core::option::Option<ArrangementInfo>,
1081    /// Hash key of the materialize node, which is a subset of pk.
1082    #[prost(uint32, repeated, tag = "2")]
1083    pub distribution_key: ::prost::alloc::vec::Vec<u32>,
1084    /// Used for internal table states.
1085    #[prost(message, optional, tag = "3")]
1086    pub table: ::core::option::Option<super::catalog::Table>,
1087}
1088/// Special node for shared state. LookupNode will join an arrangement with a stream.
1089#[derive(prost_helpers::AnyPB)]
1090#[derive(Clone, PartialEq, ::prost::Message)]
1091pub struct LookupNode {
1092    /// Join key of the arrangement side
1093    #[prost(int32, repeated, tag = "1")]
1094    pub arrange_key: ::prost::alloc::vec::Vec<i32>,
1095    /// Join key of the stream side
1096    #[prost(int32, repeated, tag = "2")]
1097    pub stream_key: ::prost::alloc::vec::Vec<i32>,
1098    /// Whether to join the current epoch of arrangement
1099    #[prost(bool, tag = "3")]
1100    pub use_current_epoch: bool,
1101    /// Sometimes we need to re-order the output data to meet the requirement of schema.
1102    /// By default, lookup executor will produce `<arrangement side, stream side>`. We
1103    /// will then apply the column mapping to the combined result.
1104    #[prost(int32, repeated, tag = "4")]
1105    pub column_mapping: ::prost::alloc::vec::Vec<i32>,
1106    /// Info about the arrangement
1107    #[prost(message, optional, tag = "7")]
1108    pub arrangement_table_info: ::core::option::Option<ArrangementInfo>,
1109    #[prost(oneof = "lookup_node::ArrangementTableId", tags = "5, 6")]
1110    pub arrangement_table_id: ::core::option::Option<lookup_node::ArrangementTableId>,
1111}
1112/// Nested message and enum types in `LookupNode`.
1113pub mod lookup_node {
1114    #[derive(prost_helpers::AnyPB)]
1115    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1116    pub enum ArrangementTableId {
1117        /// Table Id of the arrangement (when created along with join plan)
1118        #[prost(uint32, tag = "5")]
1119        TableId(u32),
1120        /// Table Id of the arrangement (when using index)
1121        #[prost(uint32, tag = "6")]
1122        IndexId(u32),
1123    }
1124}
1125/// WatermarkFilter needs to filter the upstream data by the water mark.
1126#[derive(prost_helpers::AnyPB)]
1127#[derive(Clone, PartialEq, ::prost::Message)]
1128pub struct WatermarkFilterNode {
1129    /// The watermark descs
1130    #[prost(message, repeated, tag = "1")]
1131    pub watermark_descs: ::prost::alloc::vec::Vec<super::catalog::WatermarkDesc>,
1132    /// The tables used to persist watermarks, the key is vnode.
1133    #[prost(message, repeated, tag = "2")]
1134    pub tables: ::prost::alloc::vec::Vec<super::catalog::Table>,
1135}
1136/// Acts like a merger, but on different inputs.
1137#[derive(prost_helpers::AnyPB)]
1138#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1139pub struct UnionNode {}
1140/// Special node for shared state. Merge and align barrier from upstreams. Pipe inputs in order.
1141#[derive(prost_helpers::AnyPB)]
1142#[derive(Clone, PartialEq, ::prost::Message)]
1143pub struct LookupUnionNode {
1144    #[prost(uint32, repeated, tag = "1")]
1145    pub order: ::prost::alloc::vec::Vec<u32>,
1146}
1147#[derive(prost_helpers::AnyPB)]
1148#[derive(Clone, PartialEq, ::prost::Message)]
1149pub struct ExpandNode {
1150    #[prost(message, repeated, tag = "1")]
1151    pub column_subsets: ::prost::alloc::vec::Vec<expand_node::Subset>,
1152}
1153/// Nested message and enum types in `ExpandNode`.
1154pub mod expand_node {
1155    #[derive(prost_helpers::AnyPB)]
1156    #[derive(Clone, PartialEq, ::prost::Message)]
1157    pub struct Subset {
1158        #[prost(uint32, repeated, tag = "1")]
1159        pub column_indices: ::prost::alloc::vec::Vec<u32>,
1160    }
1161}
1162#[derive(prost_helpers::AnyPB)]
1163#[derive(Clone, PartialEq, ::prost::Message)]
1164pub struct ProjectSetNode {
1165    #[prost(message, repeated, tag = "1")]
1166    pub select_list: ::prost::alloc::vec::Vec<super::expr::ProjectSetSelectItem>,
1167    /// this two field is expressing a list of usize pair, which means when project receives a
1168    /// watermark with `watermark_input_cols\[i\]` column index, it should derive a new watermark
1169    /// with `watermark_output_cols\[i\]`th expression
1170    #[prost(uint32, repeated, tag = "2")]
1171    pub watermark_input_cols: ::prost::alloc::vec::Vec<u32>,
1172    #[prost(uint32, repeated, tag = "3")]
1173    pub watermark_expr_indices: ::prost::alloc::vec::Vec<u32>,
1174    #[prost(uint32, repeated, tag = "4")]
1175    pub nondecreasing_exprs: ::prost::alloc::vec::Vec<u32>,
1176}
1177/// Sorts inputs and outputs ordered data based on watermark.
1178#[derive(prost_helpers::AnyPB)]
1179#[derive(Clone, PartialEq, ::prost::Message)]
1180pub struct SortNode {
1181    /// Persists data above watermark.
1182    #[prost(message, optional, tag = "1")]
1183    pub state_table: ::core::option::Option<super::catalog::Table>,
1184    /// Column index of watermark to perform sorting.
1185    #[prost(uint32, tag = "2")]
1186    pub sort_column_index: u32,
1187}
1188/// Merges two streams from streaming and batch for data manipulation.
1189#[derive(prost_helpers::AnyPB)]
1190#[derive(Clone, PartialEq, ::prost::Message)]
1191pub struct DmlNode {
1192    /// Id of the table on which DML performs.
1193    #[prost(uint32, tag = "1")]
1194    pub table_id: u32,
1195    /// Version of the table.
1196    #[prost(uint64, tag = "3")]
1197    pub table_version_id: u64,
1198    /// Column descriptions of the table.
1199    #[prost(message, repeated, tag = "2")]
1200    pub column_descs: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
1201    #[prost(uint32, optional, tag = "4")]
1202    pub rate_limit: ::core::option::Option<u32>,
1203}
1204#[derive(prost_helpers::AnyPB)]
1205#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1206pub struct RowIdGenNode {
1207    #[prost(uint64, tag = "1")]
1208    pub row_id_index: u64,
1209}
1210#[derive(prost_helpers::AnyPB)]
1211#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1212pub struct NowModeUpdateCurrent {}
1213#[derive(prost_helpers::AnyPB)]
1214#[derive(Clone, PartialEq, ::prost::Message)]
1215pub struct NowModeGenerateSeries {
1216    #[prost(message, optional, tag = "1")]
1217    pub start_timestamp: ::core::option::Option<super::data::Datum>,
1218    #[prost(message, optional, tag = "2")]
1219    pub interval: ::core::option::Option<super::data::Datum>,
1220}
1221#[derive(prost_helpers::AnyPB)]
1222#[derive(Clone, PartialEq, ::prost::Message)]
1223pub struct NowNode {
1224    /// Persists emitted 'now'.
1225    #[prost(message, optional, tag = "1")]
1226    pub state_table: ::core::option::Option<super::catalog::Table>,
1227    #[prost(oneof = "now_node::Mode", tags = "101, 102")]
1228    pub mode: ::core::option::Option<now_node::Mode>,
1229}
1230/// Nested message and enum types in `NowNode`.
1231pub mod now_node {
1232    #[derive(prost_helpers::AnyPB)]
1233    #[derive(Clone, PartialEq, ::prost::Oneof)]
1234    pub enum Mode {
1235        #[prost(message, tag = "101")]
1236        UpdateCurrent(super::NowModeUpdateCurrent),
1237        #[prost(message, tag = "102")]
1238        GenerateSeries(super::NowModeGenerateSeries),
1239    }
1240}
1241#[derive(prost_helpers::AnyPB)]
1242#[derive(Clone, PartialEq, ::prost::Message)]
1243pub struct ValuesNode {
1244    #[prost(message, repeated, tag = "1")]
1245    pub tuples: ::prost::alloc::vec::Vec<values_node::ExprTuple>,
1246    #[prost(message, repeated, tag = "2")]
1247    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
1248}
1249/// Nested message and enum types in `ValuesNode`.
1250pub mod values_node {
1251    #[derive(prost_helpers::AnyPB)]
1252    #[derive(Clone, PartialEq, ::prost::Message)]
1253    pub struct ExprTuple {
1254        #[prost(message, repeated, tag = "1")]
1255        pub cells: ::prost::alloc::vec::Vec<super::super::expr::ExprNode>,
1256    }
1257}
1258#[derive(prost_helpers::AnyPB)]
1259#[derive(Clone, PartialEq, ::prost::Message)]
1260pub struct DedupNode {
1261    #[prost(message, optional, tag = "1")]
1262    pub state_table: ::core::option::Option<super::catalog::Table>,
1263    #[prost(uint32, repeated, tag = "2")]
1264    pub dedup_column_indices: ::prost::alloc::vec::Vec<u32>,
1265}
1266#[derive(prost_helpers::AnyPB)]
1267#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1268pub struct NoOpNode {}
1269#[derive(prost_helpers::AnyPB)]
1270#[derive(Clone, PartialEq, ::prost::Message)]
1271pub struct EowcOverWindowNode {
1272    #[prost(message, repeated, tag = "1")]
1273    pub calls: ::prost::alloc::vec::Vec<super::expr::WindowFunction>,
1274    #[prost(uint32, repeated, tag = "2")]
1275    pub partition_by: ::prost::alloc::vec::Vec<u32>,
1276    /// use `repeated` in case of future extension, now only one column is allowed
1277    #[prost(message, repeated, tag = "3")]
1278    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1279    #[prost(message, optional, tag = "4")]
1280    pub state_table: ::core::option::Option<super::catalog::Table>,
1281}
1282#[derive(prost_helpers::AnyPB)]
1283#[derive(Clone, PartialEq, ::prost::Message)]
1284pub struct OverWindowNode {
1285    #[prost(message, repeated, tag = "1")]
1286    pub calls: ::prost::alloc::vec::Vec<super::expr::WindowFunction>,
1287    #[prost(uint32, repeated, tag = "2")]
1288    pub partition_by: ::prost::alloc::vec::Vec<u32>,
1289    #[prost(message, repeated, tag = "3")]
1290    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1291    #[prost(message, optional, tag = "4")]
1292    pub state_table: ::core::option::Option<super::catalog::Table>,
1293    #[prost(enumeration = "OverWindowCachePolicy", tag = "5")]
1294    pub cache_policy: i32,
1295}
1296#[derive(prost_helpers::AnyPB)]
1297#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1298pub struct LocalApproxPercentileNode {
1299    #[prost(double, tag = "1")]
1300    pub base: f64,
1301    #[prost(uint32, tag = "2")]
1302    pub percentile_index: u32,
1303}
1304#[derive(prost_helpers::AnyPB)]
1305#[derive(Clone, PartialEq, ::prost::Message)]
1306pub struct GlobalApproxPercentileNode {
1307    #[prost(double, tag = "1")]
1308    pub base: f64,
1309    #[prost(double, tag = "2")]
1310    pub quantile: f64,
1311    #[prost(message, optional, tag = "3")]
1312    pub bucket_state_table: ::core::option::Option<super::catalog::Table>,
1313    #[prost(message, optional, tag = "4")]
1314    pub count_state_table: ::core::option::Option<super::catalog::Table>,
1315}
1316#[derive(prost_helpers::AnyPB)]
1317#[derive(Clone, PartialEq, ::prost::Message)]
1318pub struct RowMergeNode {
1319    #[prost(message, optional, tag = "1")]
1320    pub lhs_mapping: ::core::option::Option<super::catalog::ColIndexMapping>,
1321    #[prost(message, optional, tag = "2")]
1322    pub rhs_mapping: ::core::option::Option<super::catalog::ColIndexMapping>,
1323}
1324#[derive(prost_helpers::AnyPB)]
1325#[derive(Clone, PartialEq, ::prost::Message)]
1326pub struct SyncLogStoreNode {
1327    #[prost(message, optional, tag = "1")]
1328    pub log_store_table: ::core::option::Option<super::catalog::Table>,
1329    #[prost(uint32, tag = "2")]
1330    pub pause_duration_ms: u32,
1331    #[prost(uint32, tag = "3")]
1332    pub buffer_size: u32,
1333    #[prost(bool, tag = "4")]
1334    pub aligned: bool,
1335}
1336#[derive(prost_helpers::AnyPB)]
1337#[derive(Clone, PartialEq, ::prost::Message)]
1338pub struct MaterializedExprsNode {
1339    #[prost(message, repeated, tag = "1")]
1340    pub exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
1341    #[prost(message, optional, tag = "2")]
1342    pub state_table: ::core::option::Option<super::catalog::Table>,
1343    #[prost(uint32, optional, tag = "3")]
1344    pub state_clean_col_idx: ::core::option::Option<u32>,
1345}
1346#[derive(prost_helpers::AnyPB)]
1347#[derive(Clone, PartialEq, ::prost::Message)]
1348pub struct StreamNode {
1349    /// The id for the operator. This is local per mview.
1350    /// TODO: should better be a uint32.
1351    #[prost(uint64, tag = "1")]
1352    pub operator_id: u64,
1353    /// Child node in plan aka. upstream nodes in the streaming DAG
1354    #[prost(message, repeated, tag = "3")]
1355    pub input: ::prost::alloc::vec::Vec<StreamNode>,
1356    #[prost(uint32, repeated, tag = "2")]
1357    pub stream_key: ::prost::alloc::vec::Vec<u32>,
1358    #[prost(bool, tag = "24")]
1359    pub append_only: bool,
1360    #[prost(string, tag = "18")]
1361    pub identity: ::prost::alloc::string::String,
1362    /// The schema of the plan node
1363    #[prost(message, repeated, tag = "19")]
1364    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
1365    #[prost(
1366        oneof = "stream_node::NodeBody",
1367        tags = "100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149"
1368    )]
1369    pub node_body: ::core::option::Option<stream_node::NodeBody>,
1370}
1371/// Nested message and enum types in `StreamNode`.
1372pub mod stream_node {
1373    #[derive(prost_helpers::AnyPB)]
1374    #[derive(::enum_as_inner::EnumAsInner, ::strum::Display, ::strum::EnumDiscriminants)]
1375    #[strum_discriminants(derive(::strum::Display, Hash))]
1376    #[derive(Clone, PartialEq, ::prost::Oneof)]
1377    pub enum NodeBody {
1378        #[prost(message, tag = "100")]
1379        Source(::prost::alloc::boxed::Box<super::SourceNode>),
1380        #[prost(message, tag = "101")]
1381        Project(::prost::alloc::boxed::Box<super::ProjectNode>),
1382        #[prost(message, tag = "102")]
1383        Filter(::prost::alloc::boxed::Box<super::FilterNode>),
1384        #[prost(message, tag = "103")]
1385        Materialize(::prost::alloc::boxed::Box<super::MaterializeNode>),
1386        #[prost(message, tag = "104")]
1387        StatelessSimpleAgg(::prost::alloc::boxed::Box<super::SimpleAggNode>),
1388        #[prost(message, tag = "105")]
1389        SimpleAgg(::prost::alloc::boxed::Box<super::SimpleAggNode>),
1390        #[prost(message, tag = "106")]
1391        HashAgg(::prost::alloc::boxed::Box<super::HashAggNode>),
1392        #[prost(message, tag = "107")]
1393        AppendOnlyTopN(::prost::alloc::boxed::Box<super::TopNNode>),
1394        #[prost(message, tag = "108")]
1395        HashJoin(::prost::alloc::boxed::Box<super::HashJoinNode>),
1396        #[prost(message, tag = "109")]
1397        TopN(::prost::alloc::boxed::Box<super::TopNNode>),
1398        #[prost(message, tag = "110")]
1399        HopWindow(::prost::alloc::boxed::Box<super::HopWindowNode>),
1400        #[prost(message, tag = "111")]
1401        Merge(::prost::alloc::boxed::Box<super::MergeNode>),
1402        #[prost(message, tag = "112")]
1403        Exchange(::prost::alloc::boxed::Box<super::ExchangeNode>),
1404        #[prost(message, tag = "113")]
1405        StreamScan(::prost::alloc::boxed::Box<super::StreamScanNode>),
1406        #[prost(message, tag = "114")]
1407        BatchPlan(::prost::alloc::boxed::Box<super::BatchPlanNode>),
1408        #[prost(message, tag = "115")]
1409        Lookup(::prost::alloc::boxed::Box<super::LookupNode>),
1410        #[prost(message, tag = "116")]
1411        Arrange(::prost::alloc::boxed::Box<super::ArrangeNode>),
1412        #[prost(message, tag = "117")]
1413        LookupUnion(::prost::alloc::boxed::Box<super::LookupUnionNode>),
1414        #[prost(message, tag = "118")]
1415        Union(super::UnionNode),
1416        #[prost(message, tag = "119")]
1417        DeltaIndexJoin(::prost::alloc::boxed::Box<super::DeltaIndexJoinNode>),
1418        #[prost(message, tag = "120")]
1419        Sink(::prost::alloc::boxed::Box<super::SinkNode>),
1420        #[prost(message, tag = "121")]
1421        Expand(::prost::alloc::boxed::Box<super::ExpandNode>),
1422        #[prost(message, tag = "122")]
1423        DynamicFilter(::prost::alloc::boxed::Box<super::DynamicFilterNode>),
1424        #[prost(message, tag = "123")]
1425        ProjectSet(::prost::alloc::boxed::Box<super::ProjectSetNode>),
1426        #[prost(message, tag = "124")]
1427        GroupTopN(::prost::alloc::boxed::Box<super::GroupTopNNode>),
1428        #[prost(message, tag = "125")]
1429        Sort(::prost::alloc::boxed::Box<super::SortNode>),
1430        #[prost(message, tag = "126")]
1431        WatermarkFilter(::prost::alloc::boxed::Box<super::WatermarkFilterNode>),
1432        #[prost(message, tag = "127")]
1433        Dml(::prost::alloc::boxed::Box<super::DmlNode>),
1434        #[prost(message, tag = "128")]
1435        RowIdGen(::prost::alloc::boxed::Box<super::RowIdGenNode>),
1436        #[prost(message, tag = "129")]
1437        Now(::prost::alloc::boxed::Box<super::NowNode>),
1438        #[prost(message, tag = "130")]
1439        AppendOnlyGroupTopN(::prost::alloc::boxed::Box<super::GroupTopNNode>),
1440        #[prost(message, tag = "131")]
1441        TemporalJoin(::prost::alloc::boxed::Box<super::TemporalJoinNode>),
1442        #[prost(message, tag = "132")]
1443        BarrierRecv(::prost::alloc::boxed::Box<super::BarrierRecvNode>),
1444        #[prost(message, tag = "133")]
1445        Values(::prost::alloc::boxed::Box<super::ValuesNode>),
1446        #[prost(message, tag = "134")]
1447        AppendOnlyDedup(::prost::alloc::boxed::Box<super::DedupNode>),
1448        #[prost(message, tag = "135")]
1449        NoOp(super::NoOpNode),
1450        #[prost(message, tag = "136")]
1451        EowcOverWindow(::prost::alloc::boxed::Box<super::EowcOverWindowNode>),
1452        #[prost(message, tag = "137")]
1453        OverWindow(::prost::alloc::boxed::Box<super::OverWindowNode>),
1454        #[prost(message, tag = "138")]
1455        StreamFsFetch(::prost::alloc::boxed::Box<super::StreamFsFetchNode>),
1456        #[prost(message, tag = "139")]
1457        StreamCdcScan(::prost::alloc::boxed::Box<super::StreamCdcScanNode>),
1458        #[prost(message, tag = "140")]
1459        CdcFilter(::prost::alloc::boxed::Box<super::CdcFilterNode>),
1460        #[prost(message, tag = "142")]
1461        SourceBackfill(::prost::alloc::boxed::Box<super::SourceBackfillNode>),
1462        #[prost(message, tag = "143")]
1463        Changelog(::prost::alloc::boxed::Box<super::ChangeLogNode>),
1464        #[prost(message, tag = "144")]
1465        LocalApproxPercentile(
1466            ::prost::alloc::boxed::Box<super::LocalApproxPercentileNode>,
1467        ),
1468        #[prost(message, tag = "145")]
1469        GlobalApproxPercentile(
1470            ::prost::alloc::boxed::Box<super::GlobalApproxPercentileNode>,
1471        ),
1472        #[prost(message, tag = "146")]
1473        RowMerge(::prost::alloc::boxed::Box<super::RowMergeNode>),
1474        #[prost(message, tag = "147")]
1475        AsOfJoin(::prost::alloc::boxed::Box<super::AsOfJoinNode>),
1476        #[prost(message, tag = "148")]
1477        SyncLogStore(::prost::alloc::boxed::Box<super::SyncLogStoreNode>),
1478        #[prost(message, tag = "149")]
1479        MaterializedExprs(::prost::alloc::boxed::Box<super::MaterializedExprsNode>),
1480    }
1481}
1482/// The method to map the upstream columns in the dispatcher before dispatching.
1483///
1484/// - For intra-job exchange, typically the upstream and downstream columns are the same. `indices`
1485///    will be `0..len` and `types` will be empty.
1486///
1487/// - For inter-job exchange,
1488///    * if the downstream only requires a subset of the upstream columns, `indices` will be the
1489///      indices of the required columns in the upstream columns.
1490///    * if some columns are added to the upstream, `indices` will help to maintain the same schema
1491///      from the view of the downstream.
1492///    * if some columns are altered to different (composite) types, `types` will be used to convert
1493///      the upstream columns to the downstream columns to maintain the same schema.
1494#[derive(prost_helpers::AnyPB)]
1495#[derive(Clone, PartialEq, ::prost::Message)]
1496pub struct DispatchOutputMapping {
1497    /// Indices of the columns to output.
1498    #[prost(uint32, repeated, tag = "1")]
1499    pub indices: ::prost::alloc::vec::Vec<u32>,
1500    /// Besides the indices, we may also need to convert the types of some columns.
1501    /// - If no type conversion is needed, this field will be empty.
1502    /// - If type conversion is needed, this will have the same length as `indices`. Only columns with
1503    ///    type conversion will have `upstream` and `downstream` field set.
1504    #[prost(message, repeated, tag = "2")]
1505    pub types: ::prost::alloc::vec::Vec<dispatch_output_mapping::TypePair>,
1506}
1507/// Nested message and enum types in `DispatchOutputMapping`.
1508pub mod dispatch_output_mapping {
1509    #[derive(prost_helpers::AnyPB)]
1510    #[derive(Clone, PartialEq, ::prost::Message)]
1511    pub struct TypePair {
1512        #[prost(message, optional, tag = "1")]
1513        pub upstream: ::core::option::Option<super::super::data::DataType>,
1514        #[prost(message, optional, tag = "2")]
1515        pub downstream: ::core::option::Option<super::super::data::DataType>,
1516    }
1517}
1518/// The property of an edge in the fragment graph.
1519/// This is essientially a "logical" version of `Dispatcher`. See the doc of `Dispatcher` for more details.
1520#[derive(prost_helpers::AnyPB)]
1521#[derive(Clone, PartialEq, ::prost::Message)]
1522pub struct DispatchStrategy {
1523    #[prost(enumeration = "DispatcherType", tag = "1")]
1524    pub r#type: i32,
1525    #[prost(uint32, repeated, tag = "2")]
1526    pub dist_key_indices: ::prost::alloc::vec::Vec<u32>,
1527    #[prost(message, optional, tag = "3")]
1528    pub output_mapping: ::core::option::Option<DispatchOutputMapping>,
1529}
1530/// A dispatcher redistribute messages.
1531/// We encode both the type and other usage information in the proto.
1532#[derive(prost_helpers::AnyPB)]
1533#[derive(Clone, PartialEq, ::prost::Message)]
1534pub struct Dispatcher {
1535    #[prost(enumeration = "DispatcherType", tag = "1")]
1536    pub r#type: i32,
1537    /// Indices of the columns to be used for hashing.
1538    /// For dispatcher types other than HASH, this is ignored.
1539    #[prost(uint32, repeated, tag = "2")]
1540    pub dist_key_indices: ::prost::alloc::vec::Vec<u32>,
1541    /// The method to map the upstream columns in the dispatcher before dispatching.
1542    #[prost(message, optional, tag = "6")]
1543    pub output_mapping: ::core::option::Option<DispatchOutputMapping>,
1544    /// The hash mapping for consistent hash.
1545    /// For dispatcher types other than HASH, this is ignored.
1546    #[prost(message, optional, tag = "3")]
1547    pub hash_mapping: ::core::option::Option<ActorMapping>,
1548    /// Dispatcher can be uniquely identified by a combination of actor id and dispatcher id.
1549    /// This is exactly the same as its downstream fragment id.
1550    #[prost(uint64, tag = "4")]
1551    pub dispatcher_id: u64,
1552    /// Number of downstreams decides how many endpoints a dispatcher should dispatch.
1553    #[prost(uint32, repeated, tag = "5")]
1554    pub downstream_actor_id: ::prost::alloc::vec::Vec<u32>,
1555}
1556/// A StreamActor is a running fragment of the overall stream graph,
1557#[derive(prost_helpers::AnyPB)]
1558#[derive(Clone, PartialEq, ::prost::Message)]
1559pub struct StreamActor {
1560    #[prost(uint32, tag = "1")]
1561    pub actor_id: u32,
1562    #[prost(uint32, tag = "2")]
1563    pub fragment_id: u32,
1564    #[prost(message, repeated, tag = "4")]
1565    pub dispatcher: ::prost::alloc::vec::Vec<Dispatcher>,
1566    /// Vnodes that the executors in this actor own.
1567    /// If the fragment is a singleton, this field will not be set and leave a `None`.
1568    #[prost(message, optional, tag = "8")]
1569    pub vnode_bitmap: ::core::option::Option<super::common::Buffer>,
1570    /// The SQL definition of this materialized view. Used for debugging only.
1571    #[prost(string, tag = "9")]
1572    pub mview_definition: ::prost::alloc::string::String,
1573    /// Provide the necessary context, e.g. session info like time zone, for the actor.
1574    #[prost(message, optional, tag = "10")]
1575    pub expr_context: ::core::option::Option<super::plan_common::ExprContext>,
1576}
1577/// The streaming context associated with a stream plan
1578#[derive(prost_helpers::AnyPB)]
1579#[derive(Clone, PartialEq, ::prost::Message)]
1580pub struct StreamContext {
1581    /// The timezone associated with the streaming plan. Only applies to MV for now.
1582    #[prost(string, tag = "1")]
1583    pub timezone: ::prost::alloc::string::String,
1584}
1585#[derive(prost_helpers::AnyPB)]
1586#[derive(Clone, PartialEq, ::prost::Message)]
1587pub struct BackfillOrder {
1588    #[prost(map = "uint32, message", tag = "1")]
1589    pub order: ::std::collections::HashMap<u32, super::common::Uint32Vector>,
1590}
1591/// Representation of a graph of stream fragments.
1592/// Generated by the fragmenter in the frontend, only used in DDL requests and never persisted.
1593///
1594/// For the persisted form, see `TableFragments`.
1595#[derive(prost_helpers::AnyPB)]
1596#[derive(Clone, PartialEq, ::prost::Message)]
1597pub struct StreamFragmentGraph {
1598    /// all the fragments in the graph.
1599    #[prost(map = "uint32, message", tag = "1")]
1600    pub fragments: ::std::collections::HashMap<
1601        u32,
1602        stream_fragment_graph::StreamFragment,
1603    >,
1604    /// edges between fragments.
1605    #[prost(message, repeated, tag = "2")]
1606    pub edges: ::prost::alloc::vec::Vec<stream_fragment_graph::StreamFragmentEdge>,
1607    #[prost(uint32, repeated, tag = "3")]
1608    pub dependent_table_ids: ::prost::alloc::vec::Vec<u32>,
1609    #[prost(uint32, tag = "4")]
1610    pub table_ids_cnt: u32,
1611    #[prost(message, optional, tag = "5")]
1612    pub ctx: ::core::option::Option<StreamContext>,
1613    /// If none, default parallelism will be applied.
1614    #[prost(message, optional, tag = "6")]
1615    pub parallelism: ::core::option::Option<stream_fragment_graph::Parallelism>,
1616    /// Specified max parallelism, i.e., expected vnode count for the graph.
1617    ///
1618    /// The scheduler on the meta service will use this as a hint to decide the vnode count
1619    /// for each fragment.
1620    ///
1621    /// Note that the actual vnode count may be different from this value.
1622    /// For example, a no-shuffle exchange between current fragment graph and an existing
1623    /// upstream fragment graph requires two fragments to be in the same distribution,
1624    /// thus the same vnode count.
1625    #[prost(uint32, tag = "7")]
1626    pub max_parallelism: u32,
1627    /// The backfill order strategy for the fragments.
1628    #[prost(message, optional, tag = "8")]
1629    pub backfill_order: ::core::option::Option<BackfillOrder>,
1630}
1631/// Nested message and enum types in `StreamFragmentGraph`.
1632pub mod stream_fragment_graph {
1633    #[derive(prost_helpers::AnyPB)]
1634    #[derive(Clone, PartialEq, ::prost::Message)]
1635    pub struct StreamFragment {
1636        /// 0-based on frontend, and will be rewritten to global id on meta.
1637        #[prost(uint32, tag = "1")]
1638        pub fragment_id: u32,
1639        /// root stream node in this fragment.
1640        #[prost(message, optional, tag = "2")]
1641        pub node: ::core::option::Option<super::StreamNode>,
1642        /// Bitwise-OR of `FragmentTypeFlag`s
1643        #[prost(uint32, tag = "3")]
1644        pub fragment_type_mask: u32,
1645        /// Mark whether this fragment requires exactly one actor.
1646        /// Note: if this is `false`, the fragment may still be a singleton according to the scheduler.
1647        /// One should check `meta.Fragment.distribution_type` for the final result.
1648        #[prost(bool, tag = "4")]
1649        pub requires_singleton: bool,
1650        /// Number of table ids (stateful states) for this fragment.
1651        #[prost(uint32, tag = "5")]
1652        pub table_ids_cnt: u32,
1653        /// Mark the upstream table ids of this fragment, Used for fragments with `StreamScan`s.
1654        #[prost(uint32, repeated, tag = "6")]
1655        pub upstream_table_ids: ::prost::alloc::vec::Vec<u32>,
1656    }
1657    #[derive(prost_helpers::AnyPB)]
1658    #[derive(Clone, PartialEq, ::prost::Message)]
1659    pub struct StreamFragmentEdge {
1660        /// Dispatch strategy for the fragment.
1661        #[prost(message, optional, tag = "1")]
1662        pub dispatch_strategy: ::core::option::Option<super::DispatchStrategy>,
1663        /// A unique identifier of this edge. Generally it should be exchange node's operator id. When
1664        /// rewriting fragments into delta joins or when inserting 1-to-1 exchange, there will be
1665        /// virtual links generated.
1666        #[prost(uint64, tag = "3")]
1667        pub link_id: u64,
1668        #[prost(uint32, tag = "4")]
1669        pub upstream_id: u32,
1670        #[prost(uint32, tag = "5")]
1671        pub downstream_id: u32,
1672    }
1673    #[derive(prost_helpers::AnyPB)]
1674    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1675    pub struct Parallelism {
1676        #[prost(uint64, tag = "1")]
1677        pub parallelism: u64,
1678    }
1679}
1680#[derive(prost_helpers::AnyPB)]
1681#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1682#[repr(i32)]
1683pub enum SinkLogStoreType {
1684    /// / Default value is the normal in memory log store to be backward compatible with the previously unset value
1685    Unspecified = 0,
1686    KvLogStore = 1,
1687    InMemoryLogStore = 2,
1688}
1689impl SinkLogStoreType {
1690    /// String value of the enum field names used in the ProtoBuf definition.
1691    ///
1692    /// The values are not transformed in any way and thus are considered stable
1693    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1694    pub fn as_str_name(&self) -> &'static str {
1695        match self {
1696            Self::Unspecified => "SINK_LOG_STORE_TYPE_UNSPECIFIED",
1697            Self::KvLogStore => "SINK_LOG_STORE_TYPE_KV_LOG_STORE",
1698            Self::InMemoryLogStore => "SINK_LOG_STORE_TYPE_IN_MEMORY_LOG_STORE",
1699        }
1700    }
1701    /// Creates an enum from field names used in the ProtoBuf definition.
1702    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1703        match value {
1704            "SINK_LOG_STORE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1705            "SINK_LOG_STORE_TYPE_KV_LOG_STORE" => Some(Self::KvLogStore),
1706            "SINK_LOG_STORE_TYPE_IN_MEMORY_LOG_STORE" => Some(Self::InMemoryLogStore),
1707            _ => None,
1708        }
1709    }
1710}
1711#[derive(prost_helpers::AnyPB)]
1712#[derive(prost_helpers::Version)]
1713#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1714#[repr(i32)]
1715pub enum AggNodeVersion {
1716    Unspecified = 0,
1717    /// <https://github.com/risingwavelabs/risingwave/issues/12140#issuecomment-1776289808>
1718    Issue12140 = 1,
1719    /// <https://github.com/risingwavelabs/risingwave/issues/13465#issuecomment-1821016508>
1720    Issue13465 = 2,
1721}
1722impl AggNodeVersion {
1723    /// String value of the enum field names used in the ProtoBuf definition.
1724    ///
1725    /// The values are not transformed in any way and thus are considered stable
1726    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1727    pub fn as_str_name(&self) -> &'static str {
1728        match self {
1729            Self::Unspecified => "AGG_NODE_VERSION_UNSPECIFIED",
1730            Self::Issue12140 => "AGG_NODE_VERSION_ISSUE_12140",
1731            Self::Issue13465 => "AGG_NODE_VERSION_ISSUE_13465",
1732        }
1733    }
1734    /// Creates an enum from field names used in the ProtoBuf definition.
1735    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1736        match value {
1737            "AGG_NODE_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
1738            "AGG_NODE_VERSION_ISSUE_12140" => Some(Self::Issue12140),
1739            "AGG_NODE_VERSION_ISSUE_13465" => Some(Self::Issue13465),
1740            _ => None,
1741        }
1742    }
1743}
1744#[derive(prost_helpers::AnyPB)]
1745#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1746#[repr(i32)]
1747pub enum JoinEncodingType {
1748    Unspecified = 0,
1749    MemoryOptimized = 1,
1750    CpuOptimized = 2,
1751}
1752impl JoinEncodingType {
1753    /// String value of the enum field names used in the ProtoBuf definition.
1754    ///
1755    /// The values are not transformed in any way and thus are considered stable
1756    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1757    pub fn as_str_name(&self) -> &'static str {
1758        match self {
1759            Self::Unspecified => "UNSPECIFIED",
1760            Self::MemoryOptimized => "MEMORY_OPTIMIZED",
1761            Self::CpuOptimized => "CPU_OPTIMIZED",
1762        }
1763    }
1764    /// Creates an enum from field names used in the ProtoBuf definition.
1765    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1766        match value {
1767            "UNSPECIFIED" => Some(Self::Unspecified),
1768            "MEMORY_OPTIMIZED" => Some(Self::MemoryOptimized),
1769            "CPU_OPTIMIZED" => Some(Self::CpuOptimized),
1770            _ => None,
1771        }
1772    }
1773}
1774/// Decides which kind of Executor will be used
1775#[derive(prost_helpers::AnyPB)]
1776#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1777#[repr(i32)]
1778pub enum StreamScanType {
1779    Unspecified = 0,
1780    /// ChainExecutor
1781    Chain = 1,
1782    /// RearrangedChainExecutor
1783    Rearrange = 2,
1784    /// BackfillExecutor
1785    Backfill = 3,
1786    /// ChainExecutor with upstream_only = true
1787    UpstreamOnly = 4,
1788    /// ArrangementBackfillExecutor
1789    ArrangementBackfill = 5,
1790    /// SnapshotBackfillExecutor
1791    SnapshotBackfill = 6,
1792    /// SnapshotBackfillExecutor
1793    CrossDbSnapshotBackfill = 7,
1794}
1795impl StreamScanType {
1796    /// String value of the enum field names used in the ProtoBuf definition.
1797    ///
1798    /// The values are not transformed in any way and thus are considered stable
1799    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1800    pub fn as_str_name(&self) -> &'static str {
1801        match self {
1802            Self::Unspecified => "STREAM_SCAN_TYPE_UNSPECIFIED",
1803            Self::Chain => "STREAM_SCAN_TYPE_CHAIN",
1804            Self::Rearrange => "STREAM_SCAN_TYPE_REARRANGE",
1805            Self::Backfill => "STREAM_SCAN_TYPE_BACKFILL",
1806            Self::UpstreamOnly => "STREAM_SCAN_TYPE_UPSTREAM_ONLY",
1807            Self::ArrangementBackfill => "STREAM_SCAN_TYPE_ARRANGEMENT_BACKFILL",
1808            Self::SnapshotBackfill => "STREAM_SCAN_TYPE_SNAPSHOT_BACKFILL",
1809            Self::CrossDbSnapshotBackfill => {
1810                "STREAM_SCAN_TYPE_CROSS_DB_SNAPSHOT_BACKFILL"
1811            }
1812        }
1813    }
1814    /// Creates an enum from field names used in the ProtoBuf definition.
1815    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1816        match value {
1817            "STREAM_SCAN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1818            "STREAM_SCAN_TYPE_CHAIN" => Some(Self::Chain),
1819            "STREAM_SCAN_TYPE_REARRANGE" => Some(Self::Rearrange),
1820            "STREAM_SCAN_TYPE_BACKFILL" => Some(Self::Backfill),
1821            "STREAM_SCAN_TYPE_UPSTREAM_ONLY" => Some(Self::UpstreamOnly),
1822            "STREAM_SCAN_TYPE_ARRANGEMENT_BACKFILL" => Some(Self::ArrangementBackfill),
1823            "STREAM_SCAN_TYPE_SNAPSHOT_BACKFILL" => Some(Self::SnapshotBackfill),
1824            "STREAM_SCAN_TYPE_CROSS_DB_SNAPSHOT_BACKFILL" => {
1825                Some(Self::CrossDbSnapshotBackfill)
1826            }
1827            _ => None,
1828        }
1829    }
1830}
1831#[derive(prost_helpers::AnyPB)]
1832#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1833#[repr(i32)]
1834pub enum OverWindowCachePolicy {
1835    Unspecified = 0,
1836    Full = 1,
1837    Recent = 2,
1838    RecentFirstN = 3,
1839    RecentLastN = 4,
1840}
1841impl OverWindowCachePolicy {
1842    /// String value of the enum field names used in the ProtoBuf definition.
1843    ///
1844    /// The values are not transformed in any way and thus are considered stable
1845    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1846    pub fn as_str_name(&self) -> &'static str {
1847        match self {
1848            Self::Unspecified => "OVER_WINDOW_CACHE_POLICY_UNSPECIFIED",
1849            Self::Full => "OVER_WINDOW_CACHE_POLICY_FULL",
1850            Self::Recent => "OVER_WINDOW_CACHE_POLICY_RECENT",
1851            Self::RecentFirstN => "OVER_WINDOW_CACHE_POLICY_RECENT_FIRST_N",
1852            Self::RecentLastN => "OVER_WINDOW_CACHE_POLICY_RECENT_LAST_N",
1853        }
1854    }
1855    /// Creates an enum from field names used in the ProtoBuf definition.
1856    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1857        match value {
1858            "OVER_WINDOW_CACHE_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
1859            "OVER_WINDOW_CACHE_POLICY_FULL" => Some(Self::Full),
1860            "OVER_WINDOW_CACHE_POLICY_RECENT" => Some(Self::Recent),
1861            "OVER_WINDOW_CACHE_POLICY_RECENT_FIRST_N" => Some(Self::RecentFirstN),
1862            "OVER_WINDOW_CACHE_POLICY_RECENT_LAST_N" => Some(Self::RecentLastN),
1863            _ => None,
1864        }
1865    }
1866}
1867#[derive(prost_helpers::AnyPB)]
1868#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1869#[repr(i32)]
1870pub enum DispatcherType {
1871    Unspecified = 0,
1872    /// Dispatch by hash key, hashed by consistent hash.
1873    Hash = 1,
1874    /// Broadcast to all downstreams.
1875    ///
1876    /// Note a broadcast cannot be represented as multiple simple dispatchers, since they are
1877    /// different when we update dispatchers during scaling.
1878    Broadcast = 2,
1879    /// Only one downstream.
1880    Simple = 3,
1881    /// A special kind of exchange that doesn't involve shuffle. The upstream actor will be directly
1882    /// piped into the downstream actor, if there are the same number of actors. If number of actors
1883    /// are not the same, should use hash instead. Should be only used when distribution is the same.
1884    NoShuffle = 4,
1885}
1886impl DispatcherType {
1887    /// String value of the enum field names used in the ProtoBuf definition.
1888    ///
1889    /// The values are not transformed in any way and thus are considered stable
1890    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1891    pub fn as_str_name(&self) -> &'static str {
1892        match self {
1893            Self::Unspecified => "DISPATCHER_TYPE_UNSPECIFIED",
1894            Self::Hash => "DISPATCHER_TYPE_HASH",
1895            Self::Broadcast => "DISPATCHER_TYPE_BROADCAST",
1896            Self::Simple => "DISPATCHER_TYPE_SIMPLE",
1897            Self::NoShuffle => "DISPATCHER_TYPE_NO_SHUFFLE",
1898        }
1899    }
1900    /// Creates an enum from field names used in the ProtoBuf definition.
1901    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1902        match value {
1903            "DISPATCHER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1904            "DISPATCHER_TYPE_HASH" => Some(Self::Hash),
1905            "DISPATCHER_TYPE_BROADCAST" => Some(Self::Broadcast),
1906            "DISPATCHER_TYPE_SIMPLE" => Some(Self::Simple),
1907            "DISPATCHER_TYPE_NO_SHUFFLE" => Some(Self::NoShuffle),
1908            _ => None,
1909        }
1910    }
1911}