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