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