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, 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    #[prost(uint32, repeated, tag = "2")]
646    pub distribution_keys: ::prost::alloc::vec::Vec<u32>,
647}
648#[derive(prost_helpers::AnyPB)]
649#[derive(Clone, PartialEq, ::prost::Message)]
650pub struct CdcFilterNode {
651    #[prost(message, optional, tag = "1")]
652    pub search_condition: ::core::option::Option<super::expr::ExprNode>,
653    #[prost(uint32, tag = "2")]
654    pub upstream_source_id: u32,
655}
656/// A materialized view is regarded as a table.
657/// In addition, we also specify primary key to MV for efficient point lookup during update and deletion.
658///
659/// The node will be used for both create mv and create index.
660/// - When creating mv, `pk == distribution_key == column_orders`.
661/// - When creating index, `column_orders` will contain both
662///    arrange columns and pk columns, while distribution key will be arrange columns.
663#[derive(prost_helpers::AnyPB)]
664#[derive(Clone, PartialEq, ::prost::Message)]
665pub struct MaterializeNode {
666    #[prost(uint32, tag = "1")]
667    pub table_id: u32,
668    /// Column indexes and orders of primary key.
669    #[prost(message, repeated, tag = "2")]
670    pub column_orders: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
671    /// Primary materialized table that stores the final result data.
672    /// Purpose: This is the main table that users query against. It contains the
673    ///           complete materialized view results with all columns from the SELECT clause.
674    /// Schema: Matches the output schema of the materialized view query
675    /// PK: Determined by the stream key of the materialized view
676    /// Distribution: Hash distributed by primary key columns for parallel processing
677    #[prost(message, optional, tag = "3")]
678    pub table: ::core::option::Option<super::catalog::Table>,
679    /// Staging table for refreshable materialized views during refresh operations.
680    /// Purpose: Temporary storage for collecting new/updated data during refresh.
681    ///           This allows atomic replacement of old data with refreshed data.
682    /// Schema: Contains only the primary key columns from the main table (pk-only table)
683    ///          - All PK columns with same data types as main table
684    ///          - Same primary key definition as main table
685    /// Usage: Active only during refresh operations, empty otherwise
686    /// Lifecycle: Created -> populated during refresh -> merged with main table -> cleared
687    #[prost(message, optional, tag = "5")]
688    pub staging_table: ::core::option::Option<super::catalog::Table>,
689    /// Progress tracking table for refreshable materialized views.
690    /// Purpose: Tracks refresh operation progress per VirtualNode to enable fault-tolerant
691    ///           resumable refresh operations. Stores checkpoint information for recovery.
692    /// Schema: Simplified variable-length schema (following backfill pattern):
693    ///          - vnode (i32): VirtualNode identifier (PK)
694    ///          - current_pos...: Current processing position (variable PK fields from upstream)
695    ///          - is_completed (bool): Whether this vnode has completed processing
696    ///          - processed_rows (i64): Number of rows processed so far in this vnode
697    /// PK: vnode (allows efficient per-vnode progress lookup and updates)
698    /// Distribution: Hash distributed by vnode for parallel progress tracking
699    /// Usage: Persists across refresh operations for resumability
700    /// Note: Stage info is now tracked in MaterializeExecutor memory for simplicity
701    #[prost(message, optional, tag = "6")]
702    pub refresh_progress_table: ::core::option::Option<super::catalog::Table>,
703}
704#[derive(prost_helpers::AnyPB)]
705#[derive(Clone, PartialEq, ::prost::Message)]
706pub struct AggCallState {
707    #[prost(oneof = "agg_call_state::Inner", tags = "1, 3")]
708    pub inner: ::core::option::Option<agg_call_state::Inner>,
709}
710/// Nested message and enum types in `AggCallState`.
711pub mod agg_call_state {
712    /// the state is stored in the intermediate state table. used for count/sum/append-only extreme.
713    #[derive(prost_helpers::AnyPB)]
714    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
715    pub struct ValueState {}
716    /// use the some column of the Upstream's materialization as the AggCall's state, used for extreme/string_agg/array_agg.
717    #[derive(prost_helpers::AnyPB)]
718    #[derive(Clone, PartialEq, ::prost::Message)]
719    pub struct MaterializedInputState {
720        #[prost(message, optional, tag = "1")]
721        pub table: ::core::option::Option<super::super::catalog::Table>,
722        /// for constructing state table column mapping
723        #[prost(uint32, repeated, tag = "2")]
724        pub included_upstream_indices: ::prost::alloc::vec::Vec<u32>,
725        #[prost(uint32, repeated, tag = "3")]
726        pub table_value_indices: ::prost::alloc::vec::Vec<u32>,
727        #[prost(message, repeated, tag = "4")]
728        pub order_columns: ::prost::alloc::vec::Vec<super::super::common::ColumnOrder>,
729    }
730    #[derive(prost_helpers::AnyPB)]
731    #[derive(Clone, PartialEq, ::prost::Oneof)]
732    pub enum Inner {
733        #[prost(message, tag = "1")]
734        ValueState(ValueState),
735        #[prost(message, tag = "3")]
736        MaterializedInputState(MaterializedInputState),
737    }
738}
739#[derive(prost_helpers::AnyPB)]
740#[derive(Clone, PartialEq, ::prost::Message)]
741pub struct SimpleAggNode {
742    #[prost(message, repeated, tag = "1")]
743    pub agg_calls: ::prost::alloc::vec::Vec<super::expr::AggCall>,
744    #[prost(message, repeated, tag = "3")]
745    pub agg_call_states: ::prost::alloc::vec::Vec<AggCallState>,
746    #[prost(message, optional, tag = "4")]
747    pub intermediate_state_table: ::core::option::Option<super::catalog::Table>,
748    /// Whether to optimize for append only stream.
749    /// It is true when the input is append-only
750    #[prost(bool, tag = "5")]
751    pub is_append_only: bool,
752    #[prost(map = "uint32, message", tag = "6")]
753    pub distinct_dedup_tables: ::std::collections::HashMap<u32, super::catalog::Table>,
754    #[prost(uint32, tag = "7")]
755    pub row_count_index: u32,
756    #[prost(enumeration = "AggNodeVersion", tag = "8")]
757    pub version: i32,
758    /// Required by the downstream `RowMergeNode`,
759    /// currently only used by the `approx_percentile`'s two phase plan
760    #[prost(bool, tag = "9")]
761    pub must_output_per_barrier: bool,
762}
763#[derive(prost_helpers::AnyPB)]
764#[derive(Clone, PartialEq, ::prost::Message)]
765pub struct HashAggNode {
766    #[prost(uint32, repeated, tag = "1")]
767    pub group_key: ::prost::alloc::vec::Vec<u32>,
768    #[prost(message, repeated, tag = "2")]
769    pub agg_calls: ::prost::alloc::vec::Vec<super::expr::AggCall>,
770    #[prost(message, repeated, tag = "3")]
771    pub agg_call_states: ::prost::alloc::vec::Vec<AggCallState>,
772    #[prost(message, optional, tag = "4")]
773    pub intermediate_state_table: ::core::option::Option<super::catalog::Table>,
774    /// Whether to optimize for append only stream.
775    /// It is true when the input is append-only
776    #[prost(bool, tag = "5")]
777    pub is_append_only: bool,
778    #[prost(map = "uint32, message", tag = "6")]
779    pub distinct_dedup_tables: ::std::collections::HashMap<u32, super::catalog::Table>,
780    #[prost(uint32, tag = "7")]
781    pub row_count_index: u32,
782    #[prost(bool, tag = "8")]
783    pub emit_on_window_close: bool,
784    #[prost(enumeration = "AggNodeVersion", tag = "9")]
785    pub version: i32,
786}
787#[derive(prost_helpers::AnyPB)]
788#[derive(Clone, PartialEq, ::prost::Message)]
789pub struct TopNNode {
790    /// 0 means no limit as limit of 0 means this node should be optimized away
791    #[prost(uint64, tag = "1")]
792    pub limit: u64,
793    #[prost(uint64, tag = "2")]
794    pub offset: u64,
795    #[prost(message, optional, tag = "3")]
796    pub table: ::core::option::Option<super::catalog::Table>,
797    #[prost(message, repeated, tag = "4")]
798    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
799    #[prost(bool, tag = "5")]
800    pub with_ties: bool,
801}
802#[derive(prost_helpers::AnyPB)]
803#[derive(Clone, PartialEq, ::prost::Message)]
804pub struct GroupTopNNode {
805    /// 0 means no limit as limit of 0 means this node should be optimized away
806    #[prost(uint64, tag = "1")]
807    pub limit: u64,
808    #[prost(uint64, tag = "2")]
809    pub offset: u64,
810    #[prost(uint32, repeated, tag = "3")]
811    pub group_key: ::prost::alloc::vec::Vec<u32>,
812    #[prost(message, optional, tag = "4")]
813    pub table: ::core::option::Option<super::catalog::Table>,
814    #[prost(message, repeated, tag = "5")]
815    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
816    #[prost(bool, tag = "6")]
817    pub with_ties: bool,
818}
819#[derive(prost_helpers::AnyPB)]
820#[derive(Clone, PartialEq, ::prost::Message)]
821pub struct DeltaExpression {
822    #[prost(enumeration = "super::expr::expr_node::Type", tag = "1")]
823    pub delta_type: i32,
824    #[prost(message, optional, tag = "2")]
825    pub delta: ::core::option::Option<super::expr::ExprNode>,
826}
827#[derive(prost_helpers::AnyPB)]
828#[derive(Clone, PartialEq, ::prost::Message)]
829pub struct InequalityPair {
830    /// Input index of greater side of inequality.
831    #[prost(uint32, tag = "1")]
832    pub key_required_larger: u32,
833    /// Input index of less side of inequality.
834    #[prost(uint32, tag = "2")]
835    pub key_required_smaller: u32,
836    /// Whether this condition is used to clean state table of `HashJoinExecutor`.
837    #[prost(bool, tag = "3")]
838    pub clean_state: bool,
839    /// greater >= less + delta_expression, if `None`, it represents that greater >= less
840    #[prost(message, optional, tag = "4")]
841    pub delta_expression: ::core::option::Option<DeltaExpression>,
842}
843#[derive(prost_helpers::AnyPB)]
844#[derive(Clone, PartialEq, ::prost::Message)]
845pub struct HashJoinNode {
846    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
847    pub join_type: i32,
848    #[prost(int32, repeated, tag = "2")]
849    pub left_key: ::prost::alloc::vec::Vec<i32>,
850    #[prost(int32, repeated, tag = "3")]
851    pub right_key: ::prost::alloc::vec::Vec<i32>,
852    #[prost(message, optional, tag = "4")]
853    pub condition: ::core::option::Option<super::expr::ExprNode>,
854    #[prost(message, repeated, tag = "5")]
855    pub inequality_pairs: ::prost::alloc::vec::Vec<InequalityPair>,
856    /// Used for internal table states.
857    #[prost(message, optional, tag = "6")]
858    pub left_table: ::core::option::Option<super::catalog::Table>,
859    /// Used for internal table states.
860    #[prost(message, optional, tag = "7")]
861    pub right_table: ::core::option::Option<super::catalog::Table>,
862    /// Used for internal table states.
863    #[prost(message, optional, tag = "8")]
864    pub left_degree_table: ::core::option::Option<super::catalog::Table>,
865    /// Used for internal table states.
866    #[prost(message, optional, tag = "9")]
867    pub right_degree_table: ::core::option::Option<super::catalog::Table>,
868    /// The output indices of current node
869    #[prost(uint32, repeated, tag = "10")]
870    pub output_indices: ::prost::alloc::vec::Vec<u32>,
871    /// Left deduped input pk indices. The pk of the left_table and
872    /// left_degree_table is  \[left_join_key | left_deduped_input_pk_indices\]
873    /// and is expected to be the shortest key which starts with
874    /// the join key and satisfies unique constrain.
875    #[prost(uint32, repeated, tag = "11")]
876    pub left_deduped_input_pk_indices: ::prost::alloc::vec::Vec<u32>,
877    /// Right deduped input pk indices. The pk of the right_table and
878    /// right_degree_table is  \[right_join_key | right_deduped_input_pk_indices\]
879    /// and is expected to be the shortest key which starts with
880    /// the join key and satisfies unique constrain.
881    #[prost(uint32, repeated, tag = "12")]
882    pub right_deduped_input_pk_indices: ::prost::alloc::vec::Vec<u32>,
883    #[prost(bool, repeated, tag = "13")]
884    pub null_safe: ::prost::alloc::vec::Vec<bool>,
885    /// Whether to optimize for append only stream.
886    /// It is true when the input is append-only
887    #[prost(bool, tag = "14")]
888    pub is_append_only: bool,
889    /// Which encoding will be used to encode join rows in operator cache.
890    #[prost(enumeration = "JoinEncodingType", tag = "15")]
891    pub join_encoding_type: i32,
892}
893#[derive(prost_helpers::AnyPB)]
894#[derive(Clone, PartialEq, ::prost::Message)]
895pub struct AsOfJoinNode {
896    #[prost(enumeration = "super::plan_common::AsOfJoinType", tag = "1")]
897    pub join_type: i32,
898    #[prost(int32, repeated, tag = "2")]
899    pub left_key: ::prost::alloc::vec::Vec<i32>,
900    #[prost(int32, repeated, tag = "3")]
901    pub right_key: ::prost::alloc::vec::Vec<i32>,
902    /// Used for internal table states.
903    #[prost(message, optional, tag = "4")]
904    pub left_table: ::core::option::Option<super::catalog::Table>,
905    /// Used for internal table states.
906    #[prost(message, optional, tag = "5")]
907    pub right_table: ::core::option::Option<super::catalog::Table>,
908    /// The output indices of current node
909    #[prost(uint32, repeated, tag = "6")]
910    pub output_indices: ::prost::alloc::vec::Vec<u32>,
911    /// Left deduped input pk indices. The pk of the left_table and
912    /// The pk of the left_table is  \[left_join_key | left_inequality_key | left_deduped_input_pk_indices\]
913    /// left_inequality_key is not used but for forward compatibility.
914    #[prost(uint32, repeated, tag = "7")]
915    pub left_deduped_input_pk_indices: ::prost::alloc::vec::Vec<u32>,
916    /// Right deduped input pk indices.
917    /// The pk of the right_table is  \[right_join_key | right_inequality_key | right_deduped_input_pk_indices\]
918    /// right_inequality_key is not used but for forward compatibility.
919    #[prost(uint32, repeated, tag = "8")]
920    pub right_deduped_input_pk_indices: ::prost::alloc::vec::Vec<u32>,
921    #[prost(bool, repeated, tag = "9")]
922    pub null_safe: ::prost::alloc::vec::Vec<bool>,
923    #[prost(message, optional, tag = "10")]
924    pub asof_desc: ::core::option::Option<super::plan_common::AsOfJoinDesc>,
925    /// Which encoding will be used to encode join rows in operator cache.
926    #[prost(enumeration = "JoinEncodingType", tag = "11")]
927    pub join_encoding_type: i32,
928}
929#[derive(prost_helpers::AnyPB)]
930#[derive(Clone, PartialEq, ::prost::Message)]
931pub struct TemporalJoinNode {
932    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
933    pub join_type: i32,
934    #[prost(int32, repeated, tag = "2")]
935    pub left_key: ::prost::alloc::vec::Vec<i32>,
936    #[prost(int32, repeated, tag = "3")]
937    pub right_key: ::prost::alloc::vec::Vec<i32>,
938    #[prost(bool, repeated, tag = "4")]
939    pub null_safe: ::prost::alloc::vec::Vec<bool>,
940    #[prost(message, optional, tag = "5")]
941    pub condition: ::core::option::Option<super::expr::ExprNode>,
942    /// The output indices of current node
943    #[prost(uint32, repeated, tag = "6")]
944    pub output_indices: ::prost::alloc::vec::Vec<u32>,
945    /// The table desc of the lookup side table.
946    #[prost(message, optional, tag = "7")]
947    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
948    /// The output indices of the lookup side table
949    #[prost(uint32, repeated, tag = "8")]
950    pub table_output_indices: ::prost::alloc::vec::Vec<u32>,
951    /// The state table used for non-append-only temporal join.
952    #[prost(message, optional, tag = "9")]
953    pub memo_table: ::core::option::Option<super::catalog::Table>,
954    /// If it is a nested lool temporal join
955    #[prost(bool, tag = "10")]
956    pub is_nested_loop: bool,
957}
958#[derive(prost_helpers::AnyPB)]
959#[derive(Clone, PartialEq, ::prost::Message)]
960pub struct DynamicFilterNode {
961    #[prost(uint32, tag = "1")]
962    pub left_key: u32,
963    /// Must be one of <, <=, >, >=
964    #[prost(message, optional, tag = "2")]
965    pub condition: ::core::option::Option<super::expr::ExprNode>,
966    /// Left table stores all states with predicate possibly not NULL.
967    #[prost(message, optional, tag = "3")]
968    pub left_table: ::core::option::Option<super::catalog::Table>,
969    /// Right table stores single value from RHS of predicate.
970    #[prost(message, optional, tag = "4")]
971    pub right_table: ::core::option::Option<super::catalog::Table>,
972    /// If the right side's change always make the condition more relaxed.
973    /// In other words, make more record in the left side satisfy the condition.
974    /// If this is true, we need to store LHS records which do not match the condition in the internal table.
975    /// When the condition changes, we will tell downstream to insert the LHS records which now match the condition.
976    /// If this is false, we need to store RHS records which match the condition in the internal table.
977    /// When the condition changes, we will tell downstream to delete the LHS records which now no longer match the condition.
978    #[deprecated]
979    #[prost(bool, tag = "5")]
980    pub condition_always_relax: bool,
981}
982/// Delta join with two indexes. This is a pseudo plan node generated on frontend. On meta
983/// service, it will be rewritten into lookup joins.
984#[derive(prost_helpers::AnyPB)]
985#[derive(Clone, PartialEq, ::prost::Message)]
986pub struct DeltaIndexJoinNode {
987    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
988    pub join_type: i32,
989    #[prost(int32, repeated, tag = "2")]
990    pub left_key: ::prost::alloc::vec::Vec<i32>,
991    #[prost(int32, repeated, tag = "3")]
992    pub right_key: ::prost::alloc::vec::Vec<i32>,
993    #[prost(message, optional, tag = "4")]
994    pub condition: ::core::option::Option<super::expr::ExprNode>,
995    /// Table id of the left index.
996    #[prost(uint32, tag = "7")]
997    pub left_table_id: u32,
998    /// Table id of the right index.
999    #[prost(uint32, tag = "8")]
1000    pub right_table_id: u32,
1001    /// Info about the left index
1002    #[prost(message, optional, tag = "9")]
1003    pub left_info: ::core::option::Option<ArrangementInfo>,
1004    /// Info about the right index
1005    #[prost(message, optional, tag = "10")]
1006    pub right_info: ::core::option::Option<ArrangementInfo>,
1007    /// the output indices of current node
1008    #[prost(uint32, repeated, tag = "11")]
1009    pub output_indices: ::prost::alloc::vec::Vec<u32>,
1010}
1011#[derive(prost_helpers::AnyPB)]
1012#[derive(Clone, PartialEq, ::prost::Message)]
1013pub struct HopWindowNode {
1014    #[prost(uint32, tag = "1")]
1015    pub time_col: u32,
1016    #[prost(message, optional, tag = "2")]
1017    pub window_slide: ::core::option::Option<super::data::Interval>,
1018    #[prost(message, optional, tag = "3")]
1019    pub window_size: ::core::option::Option<super::data::Interval>,
1020    #[prost(uint32, repeated, tag = "4")]
1021    pub output_indices: ::prost::alloc::vec::Vec<u32>,
1022    #[prost(message, repeated, tag = "5")]
1023    pub window_start_exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
1024    #[prost(message, repeated, tag = "6")]
1025    pub window_end_exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
1026}
1027#[derive(prost_helpers::AnyPB)]
1028#[derive(Clone, PartialEq, ::prost::Message)]
1029pub struct MergeNode {
1030    /// **WARNING**: Use this field with caution.
1031    ///
1032    /// `upstream_actor_id` stored in the plan node in `Fragment` meta model cannot be directly used.
1033    /// See `compose_fragment`.
1034    /// The field is deprecated because the upstream actor info is provided separately instead of
1035    /// injected here in the node.
1036    #[deprecated]
1037    #[prost(uint32, repeated, packed = "false", tag = "1")]
1038    pub upstream_actor_id: ::prost::alloc::vec::Vec<u32>,
1039    #[prost(uint32, tag = "2")]
1040    pub upstream_fragment_id: u32,
1041    /// Type of the upstream dispatcher. If there's always one upstream according to this
1042    /// type, the compute node may use the `ReceiverExecutor` as an optimization.
1043    #[prost(enumeration = "DispatcherType", tag = "3")]
1044    pub upstream_dispatcher_type: i32,
1045    /// The schema of input columns. Already deprecated.
1046    #[deprecated]
1047    #[prost(message, repeated, tag = "4")]
1048    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
1049}
1050/// passed from frontend to meta, used by fragmenter to generate `MergeNode`
1051/// and maybe `DispatcherNode` later.
1052#[derive(prost_helpers::AnyPB)]
1053#[derive(Clone, PartialEq, ::prost::Message)]
1054pub struct ExchangeNode {
1055    #[prost(message, optional, tag = "1")]
1056    pub strategy: ::core::option::Option<DispatchStrategy>,
1057}
1058/// StreamScanNode reads data from upstream table first, and then pass all events to downstream.
1059/// It always these 2 inputs in the following order:
1060/// 1. A MergeNode (as a placeholder) of upstream.
1061/// 2. A BatchPlanNode for the snapshot read.
1062#[derive(prost_helpers::AnyPB)]
1063#[derive(Clone, PartialEq, ::prost::Message)]
1064pub struct StreamScanNode {
1065    #[prost(uint32, tag = "1")]
1066    pub table_id: u32,
1067    /// The columns from the upstream table that'll be internally required by this stream scan node.
1068    /// - For non-backfill stream scan node, it's the same as the output columns.
1069    /// - For backfill stream scan node, there're additionally primary key columns.
1070    #[prost(int32, repeated, tag = "2")]
1071    pub upstream_column_ids: ::prost::alloc::vec::Vec<i32>,
1072    /// The columns to be output by this stream scan node. The index is based on the internal required columns.
1073    /// - For non-backfill stream scan node, it's simply all the columns.
1074    /// - For backfill stream scan node, this strips the primary key columns if they're unnecessary.
1075    #[prost(uint32, repeated, tag = "3")]
1076    pub output_indices: ::prost::alloc::vec::Vec<u32>,
1077    /// Generally, the barrier needs to be rearranged during the MV creation process, so that data can
1078    /// be flushed to shared buffer periodically, instead of making the first epoch from batch query extra
1079    /// large. However, in some cases, e.g., shared state, the barrier cannot be rearranged in StreamScanNode.
1080    /// StreamScanType is used to decide which implementation for the StreamScanNode.
1081    #[prost(enumeration = "StreamScanType", tag = "4")]
1082    pub stream_scan_type: i32,
1083    /// / The state table used by Backfill operator for persisting internal state
1084    #[prost(message, optional, tag = "5")]
1085    pub state_table: ::core::option::Option<super::catalog::Table>,
1086    /// The upstream materialized view info used by backfill.
1087    /// Used iff `ChainType::Backfill`.
1088    #[prost(message, optional, tag = "7")]
1089    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
1090    /// The backfill rate limit for the stream scan node.
1091    #[prost(uint32, optional, tag = "8")]
1092    pub rate_limit: ::core::option::Option<u32>,
1093    /// Snapshot read every N barriers
1094    #[deprecated]
1095    #[prost(uint32, tag = "9")]
1096    pub snapshot_read_barrier_interval: u32,
1097    /// The state table used by ArrangementBackfill to replicate upstream mview's state table.
1098    /// Used iff `ChainType::ArrangementBackfill`.
1099    #[prost(message, optional, tag = "10")]
1100    pub arrangement_table: ::core::option::Option<super::catalog::Table>,
1101    #[prost(uint64, optional, tag = "11")]
1102    pub snapshot_backfill_epoch: ::core::option::Option<u64>,
1103}
1104/// Config options for CDC backfill
1105#[derive(prost_helpers::AnyPB)]
1106#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1107pub struct StreamCdcScanOptions {
1108    /// Whether skip the backfill and only consume from upstream.
1109    #[prost(bool, tag = "1")]
1110    pub disable_backfill: bool,
1111    #[prost(uint32, tag = "2")]
1112    pub snapshot_barrier_interval: u32,
1113    #[prost(uint32, tag = "3")]
1114    pub snapshot_batch_size: u32,
1115    #[prost(uint32, tag = "4")]
1116    pub backfill_parallelism: u32,
1117    #[prost(uint64, tag = "5")]
1118    pub backfill_num_rows_per_split: u64,
1119    #[prost(bool, tag = "6")]
1120    pub backfill_as_even_splits: bool,
1121    #[prost(uint32, tag = "7")]
1122    pub backfill_split_pk_column_index: u32,
1123}
1124#[derive(prost_helpers::AnyPB)]
1125#[derive(Clone, PartialEq, ::prost::Message)]
1126pub struct StreamCdcScanNode {
1127    #[prost(uint32, tag = "1")]
1128    pub table_id: u32,
1129    /// The columns from the upstream table that'll be internally required by this stream scan node.
1130    /// Contains Primary Keys and Output columns.
1131    #[prost(int32, repeated, tag = "2")]
1132    pub upstream_column_ids: ::prost::alloc::vec::Vec<i32>,
1133    /// Strips the primary key columns if they're unnecessary.
1134    #[prost(uint32, repeated, tag = "3")]
1135    pub output_indices: ::prost::alloc::vec::Vec<u32>,
1136    /// The state table used by CdcBackfill operator for persisting internal state
1137    #[prost(message, optional, tag = "4")]
1138    pub state_table: ::core::option::Option<super::catalog::Table>,
1139    /// The external table that will be backfilled for CDC.
1140    #[prost(message, optional, tag = "5")]
1141    pub cdc_table_desc: ::core::option::Option<super::plan_common::ExternalTableDesc>,
1142    /// The backfill rate limit for the stream cdc scan node.
1143    #[prost(uint32, optional, tag = "6")]
1144    pub rate_limit: ::core::option::Option<u32>,
1145    /// Whether skip the backfill and only consume from upstream.
1146    /// keep it for backward compatibility, new stream plan will use `options.disable_backfill`
1147    #[prost(bool, tag = "7")]
1148    pub disable_backfill: bool,
1149    #[prost(message, optional, tag = "8")]
1150    pub options: ::core::option::Option<StreamCdcScanOptions>,
1151}
1152/// BatchPlanNode is used for mv on mv snapshot read.
1153/// BatchPlanNode is supposed to carry a batch plan that can be optimized with the streaming plan_common.
1154/// Currently, streaming to batch push down is not yet supported, BatchPlanNode is simply a table scan.
1155#[derive(prost_helpers::AnyPB)]
1156#[derive(Clone, PartialEq, ::prost::Message)]
1157pub struct BatchPlanNode {
1158    #[prost(message, optional, tag = "1")]
1159    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
1160    #[prost(int32, repeated, tag = "2")]
1161    pub column_ids: ::prost::alloc::vec::Vec<i32>,
1162}
1163#[derive(prost_helpers::AnyPB)]
1164#[derive(Clone, PartialEq, ::prost::Message)]
1165pub struct ArrangementInfo {
1166    /// Order key of the arrangement, including order by columns and pk from the materialize
1167    /// executor.
1168    #[prost(message, repeated, tag = "1")]
1169    pub arrange_key_orders: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1170    /// Column descs of the arrangement
1171    #[prost(message, repeated, tag = "2")]
1172    pub column_descs: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
1173    /// Used to build storage table by stream lookup join of delta join.
1174    #[prost(message, optional, tag = "4")]
1175    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
1176    /// Output index columns
1177    #[prost(uint32, repeated, tag = "5")]
1178    pub output_col_idx: ::prost::alloc::vec::Vec<u32>,
1179}
1180/// Special node for shared state, which will only be produced in fragmenter. ArrangeNode will
1181/// produce a special Materialize executor, which materializes data for downstream to query.
1182#[derive(prost_helpers::AnyPB)]
1183#[derive(Clone, PartialEq, ::prost::Message)]
1184pub struct ArrangeNode {
1185    /// Info about the arrangement
1186    #[prost(message, optional, tag = "1")]
1187    pub table_info: ::core::option::Option<ArrangementInfo>,
1188    /// Hash key of the materialize node, which is a subset of pk.
1189    #[prost(uint32, repeated, tag = "2")]
1190    pub distribution_key: ::prost::alloc::vec::Vec<u32>,
1191    /// Used for internal table states.
1192    #[prost(message, optional, tag = "3")]
1193    pub table: ::core::option::Option<super::catalog::Table>,
1194}
1195/// Special node for shared state. LookupNode will join an arrangement with a stream.
1196#[derive(prost_helpers::AnyPB)]
1197#[derive(Clone, PartialEq, ::prost::Message)]
1198pub struct LookupNode {
1199    /// Join key of the arrangement side
1200    #[prost(int32, repeated, tag = "1")]
1201    pub arrange_key: ::prost::alloc::vec::Vec<i32>,
1202    /// Join key of the stream side
1203    #[prost(int32, repeated, tag = "2")]
1204    pub stream_key: ::prost::alloc::vec::Vec<i32>,
1205    /// Whether to join the current epoch of arrangement
1206    #[prost(bool, tag = "3")]
1207    pub use_current_epoch: bool,
1208    /// Sometimes we need to re-order the output data to meet the requirement of schema.
1209    /// By default, lookup executor will produce `<arrangement side, stream side>`. We
1210    /// will then apply the column mapping to the combined result.
1211    #[prost(int32, repeated, tag = "4")]
1212    pub column_mapping: ::prost::alloc::vec::Vec<i32>,
1213    /// Info about the arrangement
1214    #[prost(message, optional, tag = "7")]
1215    pub arrangement_table_info: ::core::option::Option<ArrangementInfo>,
1216    #[prost(oneof = "lookup_node::ArrangementTableId", tags = "5, 6")]
1217    pub arrangement_table_id: ::core::option::Option<lookup_node::ArrangementTableId>,
1218}
1219/// Nested message and enum types in `LookupNode`.
1220pub mod lookup_node {
1221    #[derive(prost_helpers::AnyPB)]
1222    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1223    pub enum ArrangementTableId {
1224        /// Table Id of the arrangement (when created along with join plan)
1225        #[prost(uint32, tag = "5")]
1226        TableId(u32),
1227        /// Table Id of the arrangement (when using index)
1228        #[prost(uint32, tag = "6")]
1229        IndexId(u32),
1230    }
1231}
1232/// WatermarkFilter needs to filter the upstream data by the water mark.
1233#[derive(prost_helpers::AnyPB)]
1234#[derive(Clone, PartialEq, ::prost::Message)]
1235pub struct WatermarkFilterNode {
1236    /// The watermark descs
1237    #[prost(message, repeated, tag = "1")]
1238    pub watermark_descs: ::prost::alloc::vec::Vec<super::catalog::WatermarkDesc>,
1239    /// The tables used to persist watermarks, the key is vnode.
1240    #[prost(message, repeated, tag = "2")]
1241    pub tables: ::prost::alloc::vec::Vec<super::catalog::Table>,
1242}
1243/// Acts like a merger, but on different inputs.
1244#[derive(prost_helpers::AnyPB)]
1245#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1246pub struct UnionNode {}
1247/// Special node for shared state. Merge and align barrier from upstreams. Pipe inputs in order.
1248#[derive(prost_helpers::AnyPB)]
1249#[derive(Clone, PartialEq, ::prost::Message)]
1250pub struct LookupUnionNode {
1251    #[prost(uint32, repeated, tag = "1")]
1252    pub order: ::prost::alloc::vec::Vec<u32>,
1253}
1254#[derive(prost_helpers::AnyPB)]
1255#[derive(Clone, PartialEq, ::prost::Message)]
1256pub struct ExpandNode {
1257    #[prost(message, repeated, tag = "1")]
1258    pub column_subsets: ::prost::alloc::vec::Vec<expand_node::Subset>,
1259}
1260/// Nested message and enum types in `ExpandNode`.
1261pub mod expand_node {
1262    #[derive(prost_helpers::AnyPB)]
1263    #[derive(Clone, PartialEq, ::prost::Message)]
1264    pub struct Subset {
1265        #[prost(uint32, repeated, tag = "1")]
1266        pub column_indices: ::prost::alloc::vec::Vec<u32>,
1267    }
1268}
1269#[derive(prost_helpers::AnyPB)]
1270#[derive(Clone, PartialEq, ::prost::Message)]
1271pub struct ProjectSetNode {
1272    #[prost(message, repeated, tag = "1")]
1273    pub select_list: ::prost::alloc::vec::Vec<super::expr::ProjectSetSelectItem>,
1274    /// this two field is expressing a list of usize pair, which means when project receives a
1275    /// watermark with `watermark_input_cols\[i\]` column index, it should derive a new watermark
1276    /// with `watermark_output_cols\[i\]`th expression
1277    #[prost(uint32, repeated, tag = "2")]
1278    pub watermark_input_cols: ::prost::alloc::vec::Vec<u32>,
1279    #[prost(uint32, repeated, tag = "3")]
1280    pub watermark_expr_indices: ::prost::alloc::vec::Vec<u32>,
1281    #[prost(uint32, repeated, tag = "4")]
1282    pub nondecreasing_exprs: ::prost::alloc::vec::Vec<u32>,
1283}
1284/// Sorts inputs and outputs ordered data based on watermark.
1285#[derive(prost_helpers::AnyPB)]
1286#[derive(Clone, PartialEq, ::prost::Message)]
1287pub struct SortNode {
1288    /// Persists data above watermark.
1289    #[prost(message, optional, tag = "1")]
1290    pub state_table: ::core::option::Option<super::catalog::Table>,
1291    /// Column index of watermark to perform sorting.
1292    #[prost(uint32, tag = "2")]
1293    pub sort_column_index: u32,
1294}
1295/// Merges two streams from streaming and batch for data manipulation.
1296#[derive(prost_helpers::AnyPB)]
1297#[derive(Clone, PartialEq, ::prost::Message)]
1298pub struct DmlNode {
1299    /// Id of the table on which DML performs.
1300    #[prost(uint32, tag = "1")]
1301    pub table_id: u32,
1302    /// Version of the table.
1303    #[prost(uint64, tag = "3")]
1304    pub table_version_id: u64,
1305    /// Column descriptions of the table.
1306    #[prost(message, repeated, tag = "2")]
1307    pub column_descs: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
1308    #[prost(uint32, optional, tag = "4")]
1309    pub rate_limit: ::core::option::Option<u32>,
1310}
1311#[derive(prost_helpers::AnyPB)]
1312#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1313pub struct RowIdGenNode {
1314    #[prost(uint64, tag = "1")]
1315    pub row_id_index: u64,
1316}
1317#[derive(prost_helpers::AnyPB)]
1318#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1319pub struct NowModeUpdateCurrent {}
1320#[derive(prost_helpers::AnyPB)]
1321#[derive(Clone, PartialEq, ::prost::Message)]
1322pub struct NowModeGenerateSeries {
1323    #[prost(message, optional, tag = "1")]
1324    pub start_timestamp: ::core::option::Option<super::data::Datum>,
1325    #[prost(message, optional, tag = "2")]
1326    pub interval: ::core::option::Option<super::data::Datum>,
1327}
1328#[derive(prost_helpers::AnyPB)]
1329#[derive(Clone, PartialEq, ::prost::Message)]
1330pub struct NowNode {
1331    /// Persists emitted 'now'.
1332    #[prost(message, optional, tag = "1")]
1333    pub state_table: ::core::option::Option<super::catalog::Table>,
1334    #[prost(oneof = "now_node::Mode", tags = "101, 102")]
1335    pub mode: ::core::option::Option<now_node::Mode>,
1336}
1337/// Nested message and enum types in `NowNode`.
1338pub mod now_node {
1339    #[derive(prost_helpers::AnyPB)]
1340    #[derive(Clone, PartialEq, ::prost::Oneof)]
1341    pub enum Mode {
1342        #[prost(message, tag = "101")]
1343        UpdateCurrent(super::NowModeUpdateCurrent),
1344        #[prost(message, tag = "102")]
1345        GenerateSeries(super::NowModeGenerateSeries),
1346    }
1347}
1348#[derive(prost_helpers::AnyPB)]
1349#[derive(Clone, PartialEq, ::prost::Message)]
1350pub struct ValuesNode {
1351    #[prost(message, repeated, tag = "1")]
1352    pub tuples: ::prost::alloc::vec::Vec<values_node::ExprTuple>,
1353    #[prost(message, repeated, tag = "2")]
1354    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
1355}
1356/// Nested message and enum types in `ValuesNode`.
1357pub mod values_node {
1358    #[derive(prost_helpers::AnyPB)]
1359    #[derive(Clone, PartialEq, ::prost::Message)]
1360    pub struct ExprTuple {
1361        #[prost(message, repeated, tag = "1")]
1362        pub cells: ::prost::alloc::vec::Vec<super::super::expr::ExprNode>,
1363    }
1364}
1365#[derive(prost_helpers::AnyPB)]
1366#[derive(Clone, PartialEq, ::prost::Message)]
1367pub struct DedupNode {
1368    #[prost(message, optional, tag = "1")]
1369    pub state_table: ::core::option::Option<super::catalog::Table>,
1370    #[prost(uint32, repeated, tag = "2")]
1371    pub dedup_column_indices: ::prost::alloc::vec::Vec<u32>,
1372}
1373#[derive(prost_helpers::AnyPB)]
1374#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1375pub struct NoOpNode {}
1376#[derive(prost_helpers::AnyPB)]
1377#[derive(Clone, PartialEq, ::prost::Message)]
1378pub struct EowcOverWindowNode {
1379    #[prost(message, repeated, tag = "1")]
1380    pub calls: ::prost::alloc::vec::Vec<super::expr::WindowFunction>,
1381    #[prost(uint32, repeated, tag = "2")]
1382    pub partition_by: ::prost::alloc::vec::Vec<u32>,
1383    /// use `repeated` in case of future extension, now only one column is allowed
1384    #[prost(message, repeated, tag = "3")]
1385    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1386    #[prost(message, optional, tag = "4")]
1387    pub state_table: ::core::option::Option<super::catalog::Table>,
1388}
1389#[derive(prost_helpers::AnyPB)]
1390#[derive(Clone, PartialEq, ::prost::Message)]
1391pub struct OverWindowNode {
1392    #[prost(message, repeated, tag = "1")]
1393    pub calls: ::prost::alloc::vec::Vec<super::expr::WindowFunction>,
1394    #[prost(uint32, repeated, tag = "2")]
1395    pub partition_by: ::prost::alloc::vec::Vec<u32>,
1396    #[prost(message, repeated, tag = "3")]
1397    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1398    #[prost(message, optional, tag = "4")]
1399    pub state_table: ::core::option::Option<super::catalog::Table>,
1400    #[prost(enumeration = "OverWindowCachePolicy", tag = "5")]
1401    pub cache_policy: i32,
1402}
1403#[derive(prost_helpers::AnyPB)]
1404#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1405pub struct LocalApproxPercentileNode {
1406    #[prost(double, tag = "1")]
1407    pub base: f64,
1408    #[prost(uint32, tag = "2")]
1409    pub percentile_index: u32,
1410}
1411#[derive(prost_helpers::AnyPB)]
1412#[derive(Clone, PartialEq, ::prost::Message)]
1413pub struct GlobalApproxPercentileNode {
1414    #[prost(double, tag = "1")]
1415    pub base: f64,
1416    #[prost(double, tag = "2")]
1417    pub quantile: f64,
1418    #[prost(message, optional, tag = "3")]
1419    pub bucket_state_table: ::core::option::Option<super::catalog::Table>,
1420    #[prost(message, optional, tag = "4")]
1421    pub count_state_table: ::core::option::Option<super::catalog::Table>,
1422}
1423#[derive(prost_helpers::AnyPB)]
1424#[derive(Clone, PartialEq, ::prost::Message)]
1425pub struct RowMergeNode {
1426    #[prost(message, optional, tag = "1")]
1427    pub lhs_mapping: ::core::option::Option<super::catalog::ColIndexMapping>,
1428    #[prost(message, optional, tag = "2")]
1429    pub rhs_mapping: ::core::option::Option<super::catalog::ColIndexMapping>,
1430}
1431#[derive(prost_helpers::AnyPB)]
1432#[derive(Clone, PartialEq, ::prost::Message)]
1433pub struct SyncLogStoreNode {
1434    #[prost(message, optional, tag = "1")]
1435    pub log_store_table: ::core::option::Option<super::catalog::Table>,
1436    #[prost(uint32, tag = "2")]
1437    pub pause_duration_ms: u32,
1438    #[prost(uint32, tag = "3")]
1439    pub buffer_size: u32,
1440    #[prost(bool, tag = "4")]
1441    pub aligned: bool,
1442}
1443#[derive(prost_helpers::AnyPB)]
1444#[derive(Clone, PartialEq, ::prost::Message)]
1445pub struct MaterializedExprsNode {
1446    #[prost(message, repeated, tag = "1")]
1447    pub exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
1448    #[prost(message, optional, tag = "2")]
1449    pub state_table: ::core::option::Option<super::catalog::Table>,
1450    #[prost(uint32, optional, tag = "3")]
1451    pub state_clean_col_idx: ::core::option::Option<u32>,
1452}
1453#[derive(prost_helpers::AnyPB)]
1454#[derive(Clone, PartialEq, ::prost::Message)]
1455pub struct VectorIndexWriteNode {
1456    #[prost(message, optional, tag = "1")]
1457    pub table: ::core::option::Option<super::catalog::Table>,
1458}
1459#[derive(prost_helpers::AnyPB)]
1460#[derive(Clone, PartialEq, ::prost::Message)]
1461pub struct UpstreamSinkUnionNode {
1462    /// It is always empty in the persisted metadata, and get filled before we spawn the actors.
1463    /// The actual upstream info may be added and removed dynamically at runtime.
1464    #[prost(message, repeated, tag = "1")]
1465    pub init_upstreams: ::prost::alloc::vec::Vec<UpstreamSinkInfo>,
1466}
1467#[derive(prost_helpers::AnyPB)]
1468#[derive(Clone, PartialEq, ::prost::Message)]
1469pub struct StreamNode {
1470    /// The id for the operator. This is local per mview.
1471    /// TODO: should better be a uint32.
1472    #[prost(uint64, tag = "1")]
1473    pub operator_id: u64,
1474    /// Child node in plan aka. upstream nodes in the streaming DAG
1475    #[prost(message, repeated, tag = "3")]
1476    pub input: ::prost::alloc::vec::Vec<StreamNode>,
1477    #[prost(uint32, repeated, tag = "2")]
1478    pub stream_key: ::prost::alloc::vec::Vec<u32>,
1479    #[prost(enumeration = "stream_node::StreamKind", tag = "24")]
1480    pub stream_kind: i32,
1481    #[prost(string, tag = "18")]
1482    pub identity: ::prost::alloc::string::String,
1483    /// The schema of the plan node
1484    #[prost(message, repeated, tag = "19")]
1485    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
1486    #[prost(
1487        oneof = "stream_node::NodeBody",
1488        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"
1489    )]
1490    pub node_body: ::core::option::Option<stream_node::NodeBody>,
1491}
1492/// Nested message and enum types in `StreamNode`.
1493pub mod stream_node {
1494    /// This field used to be a `bool append_only`.
1495    /// Enum variants are ordered for backwards compatibility.
1496    #[derive(prost_helpers::AnyPB)]
1497    #[derive(
1498        Clone,
1499        Copy,
1500        Debug,
1501        PartialEq,
1502        Eq,
1503        Hash,
1504        PartialOrd,
1505        Ord,
1506        ::prost::Enumeration
1507    )]
1508    #[repr(i32)]
1509    pub enum StreamKind {
1510        /// buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
1511        Retract = 0,
1512        AppendOnly = 1,
1513        Upsert = 2,
1514    }
1515    impl StreamKind {
1516        /// String value of the enum field names used in the ProtoBuf definition.
1517        ///
1518        /// The values are not transformed in any way and thus are considered stable
1519        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1520        pub fn as_str_name(&self) -> &'static str {
1521            match self {
1522                Self::Retract => "STREAM_KIND_RETRACT",
1523                Self::AppendOnly => "STREAM_KIND_APPEND_ONLY",
1524                Self::Upsert => "STREAM_KIND_UPSERT",
1525            }
1526        }
1527        /// Creates an enum from field names used in the ProtoBuf definition.
1528        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1529            match value {
1530                "STREAM_KIND_RETRACT" => Some(Self::Retract),
1531                "STREAM_KIND_APPEND_ONLY" => Some(Self::AppendOnly),
1532                "STREAM_KIND_UPSERT" => Some(Self::Upsert),
1533                _ => None,
1534            }
1535        }
1536    }
1537    #[derive(prost_helpers::AnyPB)]
1538    #[derive(::enum_as_inner::EnumAsInner, ::strum::Display, ::strum::EnumDiscriminants)]
1539    #[strum_discriminants(derive(::strum::Display, Hash))]
1540    #[derive(Clone, PartialEq, ::prost::Oneof)]
1541    pub enum NodeBody {
1542        #[prost(message, tag = "100")]
1543        Source(::prost::alloc::boxed::Box<super::SourceNode>),
1544        #[prost(message, tag = "101")]
1545        Project(::prost::alloc::boxed::Box<super::ProjectNode>),
1546        #[prost(message, tag = "102")]
1547        Filter(::prost::alloc::boxed::Box<super::FilterNode>),
1548        #[prost(message, tag = "103")]
1549        Materialize(::prost::alloc::boxed::Box<super::MaterializeNode>),
1550        #[prost(message, tag = "104")]
1551        StatelessSimpleAgg(::prost::alloc::boxed::Box<super::SimpleAggNode>),
1552        #[prost(message, tag = "105")]
1553        SimpleAgg(::prost::alloc::boxed::Box<super::SimpleAggNode>),
1554        #[prost(message, tag = "106")]
1555        HashAgg(::prost::alloc::boxed::Box<super::HashAggNode>),
1556        #[prost(message, tag = "107")]
1557        AppendOnlyTopN(::prost::alloc::boxed::Box<super::TopNNode>),
1558        #[prost(message, tag = "108")]
1559        HashJoin(::prost::alloc::boxed::Box<super::HashJoinNode>),
1560        #[prost(message, tag = "109")]
1561        TopN(::prost::alloc::boxed::Box<super::TopNNode>),
1562        #[prost(message, tag = "110")]
1563        HopWindow(::prost::alloc::boxed::Box<super::HopWindowNode>),
1564        #[prost(message, tag = "111")]
1565        Merge(::prost::alloc::boxed::Box<super::MergeNode>),
1566        #[prost(message, tag = "112")]
1567        Exchange(::prost::alloc::boxed::Box<super::ExchangeNode>),
1568        #[prost(message, tag = "113")]
1569        StreamScan(::prost::alloc::boxed::Box<super::StreamScanNode>),
1570        #[prost(message, tag = "114")]
1571        BatchPlan(::prost::alloc::boxed::Box<super::BatchPlanNode>),
1572        #[prost(message, tag = "115")]
1573        Lookup(::prost::alloc::boxed::Box<super::LookupNode>),
1574        #[prost(message, tag = "116")]
1575        Arrange(::prost::alloc::boxed::Box<super::ArrangeNode>),
1576        #[prost(message, tag = "117")]
1577        LookupUnion(::prost::alloc::boxed::Box<super::LookupUnionNode>),
1578        #[prost(message, tag = "118")]
1579        Union(super::UnionNode),
1580        #[prost(message, tag = "119")]
1581        DeltaIndexJoin(::prost::alloc::boxed::Box<super::DeltaIndexJoinNode>),
1582        #[prost(message, tag = "120")]
1583        Sink(::prost::alloc::boxed::Box<super::SinkNode>),
1584        #[prost(message, tag = "121")]
1585        Expand(::prost::alloc::boxed::Box<super::ExpandNode>),
1586        #[prost(message, tag = "122")]
1587        DynamicFilter(::prost::alloc::boxed::Box<super::DynamicFilterNode>),
1588        #[prost(message, tag = "123")]
1589        ProjectSet(::prost::alloc::boxed::Box<super::ProjectSetNode>),
1590        #[prost(message, tag = "124")]
1591        GroupTopN(::prost::alloc::boxed::Box<super::GroupTopNNode>),
1592        #[prost(message, tag = "125")]
1593        Sort(::prost::alloc::boxed::Box<super::SortNode>),
1594        #[prost(message, tag = "126")]
1595        WatermarkFilter(::prost::alloc::boxed::Box<super::WatermarkFilterNode>),
1596        #[prost(message, tag = "127")]
1597        Dml(::prost::alloc::boxed::Box<super::DmlNode>),
1598        #[prost(message, tag = "128")]
1599        RowIdGen(::prost::alloc::boxed::Box<super::RowIdGenNode>),
1600        #[prost(message, tag = "129")]
1601        Now(::prost::alloc::boxed::Box<super::NowNode>),
1602        #[prost(message, tag = "130")]
1603        AppendOnlyGroupTopN(::prost::alloc::boxed::Box<super::GroupTopNNode>),
1604        #[prost(message, tag = "131")]
1605        TemporalJoin(::prost::alloc::boxed::Box<super::TemporalJoinNode>),
1606        #[prost(message, tag = "132")]
1607        BarrierRecv(::prost::alloc::boxed::Box<super::BarrierRecvNode>),
1608        #[prost(message, tag = "133")]
1609        Values(::prost::alloc::boxed::Box<super::ValuesNode>),
1610        #[prost(message, tag = "134")]
1611        AppendOnlyDedup(::prost::alloc::boxed::Box<super::DedupNode>),
1612        #[prost(message, tag = "135")]
1613        NoOp(super::NoOpNode),
1614        #[prost(message, tag = "136")]
1615        EowcOverWindow(::prost::alloc::boxed::Box<super::EowcOverWindowNode>),
1616        #[prost(message, tag = "137")]
1617        OverWindow(::prost::alloc::boxed::Box<super::OverWindowNode>),
1618        #[prost(message, tag = "138")]
1619        StreamFsFetch(::prost::alloc::boxed::Box<super::StreamFsFetchNode>),
1620        #[prost(message, tag = "139")]
1621        StreamCdcScan(::prost::alloc::boxed::Box<super::StreamCdcScanNode>),
1622        #[prost(message, tag = "140")]
1623        CdcFilter(::prost::alloc::boxed::Box<super::CdcFilterNode>),
1624        #[prost(message, tag = "142")]
1625        SourceBackfill(::prost::alloc::boxed::Box<super::SourceBackfillNode>),
1626        #[prost(message, tag = "143")]
1627        Changelog(::prost::alloc::boxed::Box<super::ChangeLogNode>),
1628        #[prost(message, tag = "144")]
1629        LocalApproxPercentile(
1630            ::prost::alloc::boxed::Box<super::LocalApproxPercentileNode>,
1631        ),
1632        #[prost(message, tag = "145")]
1633        GlobalApproxPercentile(
1634            ::prost::alloc::boxed::Box<super::GlobalApproxPercentileNode>,
1635        ),
1636        #[prost(message, tag = "146")]
1637        RowMerge(::prost::alloc::boxed::Box<super::RowMergeNode>),
1638        #[prost(message, tag = "147")]
1639        AsOfJoin(::prost::alloc::boxed::Box<super::AsOfJoinNode>),
1640        #[prost(message, tag = "148")]
1641        SyncLogStore(::prost::alloc::boxed::Box<super::SyncLogStoreNode>),
1642        #[prost(message, tag = "149")]
1643        MaterializedExprs(::prost::alloc::boxed::Box<super::MaterializedExprsNode>),
1644        #[prost(message, tag = "150")]
1645        VectorIndexWrite(::prost::alloc::boxed::Box<super::VectorIndexWriteNode>),
1646        #[prost(message, tag = "151")]
1647        UpstreamSinkUnion(::prost::alloc::boxed::Box<super::UpstreamSinkUnionNode>),
1648    }
1649}
1650/// The method to map the upstream columns in the dispatcher before dispatching.
1651///
1652/// - For intra-job exchange, typically the upstream and downstream columns are the same. `indices`
1653///    will be `0..len` and `types` will be empty.
1654///
1655/// - For inter-job exchange,
1656///    * if the downstream only requires a subset of the upstream columns, `indices` will be the
1657///      indices of the required columns in the upstream columns.
1658///    * if some columns are added to the upstream, `indices` will help to maintain the same schema
1659///      from the view of the downstream.
1660///    * if some columns are altered to different (composite) types, `types` will be used to convert
1661///      the upstream columns to the downstream columns to maintain the same schema.
1662#[derive(prost_helpers::AnyPB)]
1663#[derive(Clone, PartialEq, ::prost::Message)]
1664pub struct DispatchOutputMapping {
1665    /// Indices of the columns to output.
1666    #[prost(uint32, repeated, tag = "1")]
1667    pub indices: ::prost::alloc::vec::Vec<u32>,
1668    /// Besides the indices, we may also need to convert the types of some columns.
1669    /// - If no type conversion is needed, this field will be empty.
1670    /// - If type conversion is needed, this will have the same length as `indices`. Only columns with
1671    ///    type conversion will have `upstream` and `downstream` field set.
1672    #[prost(message, repeated, tag = "2")]
1673    pub types: ::prost::alloc::vec::Vec<dispatch_output_mapping::TypePair>,
1674}
1675/// Nested message and enum types in `DispatchOutputMapping`.
1676pub mod dispatch_output_mapping {
1677    #[derive(prost_helpers::AnyPB)]
1678    #[derive(Clone, PartialEq, ::prost::Message)]
1679    pub struct TypePair {
1680        #[prost(message, optional, tag = "1")]
1681        pub upstream: ::core::option::Option<super::super::data::DataType>,
1682        #[prost(message, optional, tag = "2")]
1683        pub downstream: ::core::option::Option<super::super::data::DataType>,
1684    }
1685}
1686/// The property of an edge in the fragment graph.
1687/// This is essientially a "logical" version of `Dispatcher`. See the doc of `Dispatcher` for more details.
1688#[derive(prost_helpers::AnyPB)]
1689#[derive(Clone, PartialEq, ::prost::Message)]
1690pub struct DispatchStrategy {
1691    #[prost(enumeration = "DispatcherType", tag = "1")]
1692    pub r#type: i32,
1693    #[prost(uint32, repeated, tag = "2")]
1694    pub dist_key_indices: ::prost::alloc::vec::Vec<u32>,
1695    #[prost(message, optional, tag = "3")]
1696    pub output_mapping: ::core::option::Option<DispatchOutputMapping>,
1697}
1698/// A dispatcher redistribute messages.
1699/// We encode both the type and other usage information in the proto.
1700#[derive(prost_helpers::AnyPB)]
1701#[derive(Clone, PartialEq, ::prost::Message)]
1702pub struct Dispatcher {
1703    #[prost(enumeration = "DispatcherType", tag = "1")]
1704    pub r#type: i32,
1705    /// Indices of the columns to be used for hashing.
1706    /// For dispatcher types other than HASH, this is ignored.
1707    #[prost(uint32, repeated, tag = "2")]
1708    pub dist_key_indices: ::prost::alloc::vec::Vec<u32>,
1709    /// The method to map the upstream columns in the dispatcher before dispatching.
1710    #[prost(message, optional, tag = "6")]
1711    pub output_mapping: ::core::option::Option<DispatchOutputMapping>,
1712    /// The hash mapping for consistent hash.
1713    /// For dispatcher types other than HASH, this is ignored.
1714    #[prost(message, optional, tag = "3")]
1715    pub hash_mapping: ::core::option::Option<ActorMapping>,
1716    /// Dispatcher can be uniquely identified by a combination of actor id and dispatcher id.
1717    /// This is exactly the same as its downstream fragment id.
1718    #[prost(uint64, tag = "4")]
1719    pub dispatcher_id: u64,
1720    /// Number of downstreams decides how many endpoints a dispatcher should dispatch.
1721    #[prost(uint32, repeated, tag = "5")]
1722    pub downstream_actor_id: ::prost::alloc::vec::Vec<u32>,
1723}
1724/// A StreamActor is a running fragment of the overall stream graph,
1725#[derive(prost_helpers::AnyPB)]
1726#[derive(Clone, PartialEq, ::prost::Message)]
1727pub struct StreamActor {
1728    #[prost(uint32, tag = "1")]
1729    pub actor_id: u32,
1730    #[prost(uint32, tag = "2")]
1731    pub fragment_id: u32,
1732    #[prost(message, repeated, tag = "4")]
1733    pub dispatcher: ::prost::alloc::vec::Vec<Dispatcher>,
1734    /// Vnodes that the executors in this actor own.
1735    /// If the fragment is a singleton, this field will not be set and leave a `None`.
1736    #[prost(message, optional, tag = "8")]
1737    pub vnode_bitmap: ::core::option::Option<super::common::Buffer>,
1738    /// The SQL definition of this materialized view. Used for debugging only.
1739    #[prost(string, tag = "9")]
1740    pub mview_definition: ::prost::alloc::string::String,
1741    /// Provide the necessary context, e.g. session info like time zone, for the actor.
1742    #[prost(message, optional, tag = "10")]
1743    pub expr_context: ::core::option::Option<super::plan_common::ExprContext>,
1744}
1745/// The streaming context associated with a stream plan
1746#[derive(prost_helpers::AnyPB)]
1747#[derive(Clone, PartialEq, ::prost::Message)]
1748pub struct StreamContext {
1749    /// The timezone associated with the streaming plan. Only applies to MV for now.
1750    #[prost(string, tag = "1")]
1751    pub timezone: ::prost::alloc::string::String,
1752}
1753#[derive(prost_helpers::AnyPB)]
1754#[derive(Clone, PartialEq, ::prost::Message)]
1755pub struct BackfillOrder {
1756    #[prost(map = "uint32, message", tag = "1")]
1757    pub order: ::std::collections::HashMap<u32, super::common::Uint32Vector>,
1758}
1759/// Representation of a graph of stream fragments.
1760/// Generated by the fragmenter in the frontend, only used in DDL requests and never persisted.
1761///
1762/// For the persisted form, see `TableFragments`.
1763#[derive(prost_helpers::AnyPB)]
1764#[derive(Clone, PartialEq, ::prost::Message)]
1765pub struct StreamFragmentGraph {
1766    /// all the fragments in the graph.
1767    #[prost(map = "uint32, message", tag = "1")]
1768    pub fragments: ::std::collections::HashMap<
1769        u32,
1770        stream_fragment_graph::StreamFragment,
1771    >,
1772    /// edges between fragments.
1773    #[prost(message, repeated, tag = "2")]
1774    pub edges: ::prost::alloc::vec::Vec<stream_fragment_graph::StreamFragmentEdge>,
1775    #[prost(uint32, repeated, tag = "3")]
1776    pub dependent_table_ids: ::prost::alloc::vec::Vec<u32>,
1777    #[prost(uint32, tag = "4")]
1778    pub table_ids_cnt: u32,
1779    #[prost(message, optional, tag = "5")]
1780    pub ctx: ::core::option::Option<StreamContext>,
1781    /// If none, default parallelism will be applied.
1782    #[prost(message, optional, tag = "6")]
1783    pub parallelism: ::core::option::Option<stream_fragment_graph::Parallelism>,
1784    /// Specified max parallelism, i.e., expected vnode count for the graph.
1785    ///
1786    /// The scheduler on the meta service will use this as a hint to decide the vnode count
1787    /// for each fragment.
1788    ///
1789    /// Note that the actual vnode count may be different from this value.
1790    /// For example, a no-shuffle exchange between current fragment graph and an existing
1791    /// upstream fragment graph requires two fragments to be in the same distribution,
1792    /// thus the same vnode count.
1793    #[prost(uint32, tag = "7")]
1794    pub max_parallelism: u32,
1795    /// The backfill order strategy for the fragments.
1796    #[prost(message, optional, tag = "8")]
1797    pub backfill_order: ::core::option::Option<BackfillOrder>,
1798}
1799/// Nested message and enum types in `StreamFragmentGraph`.
1800pub mod stream_fragment_graph {
1801    #[derive(prost_helpers::AnyPB)]
1802    #[derive(Clone, PartialEq, ::prost::Message)]
1803    pub struct StreamFragment {
1804        /// 0-based on frontend, and will be rewritten to global id on meta.
1805        #[prost(uint32, tag = "1")]
1806        pub fragment_id: u32,
1807        /// root stream node in this fragment.
1808        #[prost(message, optional, tag = "2")]
1809        pub node: ::core::option::Option<super::StreamNode>,
1810        /// Bitwise-OR of `FragmentTypeFlag`s
1811        #[prost(uint32, tag = "3")]
1812        pub fragment_type_mask: u32,
1813        /// Mark whether this fragment requires exactly one actor.
1814        /// Note: if this is `false`, the fragment may still be a singleton according to the scheduler.
1815        /// One should check `meta.Fragment.distribution_type` for the final result.
1816        #[prost(bool, tag = "4")]
1817        pub requires_singleton: bool,
1818        /// Number of table ids (stateful states) for this fragment.
1819        #[prost(uint32, tag = "5")]
1820        pub table_ids_cnt: u32,
1821        /// Mark the upstream table ids of this fragment, Used for fragments with `StreamScan`s.
1822        #[prost(uint32, repeated, tag = "6")]
1823        pub upstream_table_ids: ::prost::alloc::vec::Vec<u32>,
1824    }
1825    #[derive(prost_helpers::AnyPB)]
1826    #[derive(Clone, PartialEq, ::prost::Message)]
1827    pub struct StreamFragmentEdge {
1828        /// Dispatch strategy for the fragment.
1829        #[prost(message, optional, tag = "1")]
1830        pub dispatch_strategy: ::core::option::Option<super::DispatchStrategy>,
1831        /// A unique identifier of this edge. Generally it should be exchange node's operator id. When
1832        /// rewriting fragments into delta joins or when inserting 1-to-1 exchange, there will be
1833        /// virtual links generated.
1834        #[prost(uint64, tag = "3")]
1835        pub link_id: u64,
1836        #[prost(uint32, tag = "4")]
1837        pub upstream_id: u32,
1838        #[prost(uint32, tag = "5")]
1839        pub downstream_id: u32,
1840    }
1841    #[derive(prost_helpers::AnyPB)]
1842    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1843    pub struct Parallelism {
1844        #[prost(uint64, tag = "1")]
1845        pub parallelism: u64,
1846    }
1847}
1848#[derive(prost_helpers::AnyPB)]
1849#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1850#[repr(i32)]
1851pub enum SinkLogStoreType {
1852    /// / Default value is the normal in memory log store to be backward compatible with the previously unset value
1853    Unspecified = 0,
1854    KvLogStore = 1,
1855    InMemoryLogStore = 2,
1856}
1857impl SinkLogStoreType {
1858    /// String value of the enum field names used in the ProtoBuf definition.
1859    ///
1860    /// The values are not transformed in any way and thus are considered stable
1861    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1862    pub fn as_str_name(&self) -> &'static str {
1863        match self {
1864            Self::Unspecified => "SINK_LOG_STORE_TYPE_UNSPECIFIED",
1865            Self::KvLogStore => "SINK_LOG_STORE_TYPE_KV_LOG_STORE",
1866            Self::InMemoryLogStore => "SINK_LOG_STORE_TYPE_IN_MEMORY_LOG_STORE",
1867        }
1868    }
1869    /// Creates an enum from field names used in the ProtoBuf definition.
1870    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1871        match value {
1872            "SINK_LOG_STORE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1873            "SINK_LOG_STORE_TYPE_KV_LOG_STORE" => Some(Self::KvLogStore),
1874            "SINK_LOG_STORE_TYPE_IN_MEMORY_LOG_STORE" => Some(Self::InMemoryLogStore),
1875            _ => None,
1876        }
1877    }
1878}
1879#[derive(prost_helpers::AnyPB)]
1880#[derive(prost_helpers::Version)]
1881#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1882#[repr(i32)]
1883pub enum AggNodeVersion {
1884    Unspecified = 0,
1885    /// <https://github.com/risingwavelabs/risingwave/issues/12140#issuecomment-1776289808>
1886    Issue12140 = 1,
1887    /// <https://github.com/risingwavelabs/risingwave/issues/13465#issuecomment-1821016508>
1888    Issue13465 = 2,
1889}
1890impl AggNodeVersion {
1891    /// String value of the enum field names used in the ProtoBuf definition.
1892    ///
1893    /// The values are not transformed in any way and thus are considered stable
1894    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1895    pub fn as_str_name(&self) -> &'static str {
1896        match self {
1897            Self::Unspecified => "AGG_NODE_VERSION_UNSPECIFIED",
1898            Self::Issue12140 => "AGG_NODE_VERSION_ISSUE_12140",
1899            Self::Issue13465 => "AGG_NODE_VERSION_ISSUE_13465",
1900        }
1901    }
1902    /// Creates an enum from field names used in the ProtoBuf definition.
1903    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1904        match value {
1905            "AGG_NODE_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
1906            "AGG_NODE_VERSION_ISSUE_12140" => Some(Self::Issue12140),
1907            "AGG_NODE_VERSION_ISSUE_13465" => Some(Self::Issue13465),
1908            _ => None,
1909        }
1910    }
1911}
1912#[derive(prost_helpers::AnyPB)]
1913#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1914#[repr(i32)]
1915pub enum JoinEncodingType {
1916    Unspecified = 0,
1917    MemoryOptimized = 1,
1918    CpuOptimized = 2,
1919}
1920impl JoinEncodingType {
1921    /// String value of the enum field names used in the ProtoBuf definition.
1922    ///
1923    /// The values are not transformed in any way and thus are considered stable
1924    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1925    pub fn as_str_name(&self) -> &'static str {
1926        match self {
1927            Self::Unspecified => "UNSPECIFIED",
1928            Self::MemoryOptimized => "MEMORY_OPTIMIZED",
1929            Self::CpuOptimized => "CPU_OPTIMIZED",
1930        }
1931    }
1932    /// Creates an enum from field names used in the ProtoBuf definition.
1933    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1934        match value {
1935            "UNSPECIFIED" => Some(Self::Unspecified),
1936            "MEMORY_OPTIMIZED" => Some(Self::MemoryOptimized),
1937            "CPU_OPTIMIZED" => Some(Self::CpuOptimized),
1938            _ => None,
1939        }
1940    }
1941}
1942/// Decides which kind of Executor will be used
1943#[derive(prost_helpers::AnyPB)]
1944#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1945#[repr(i32)]
1946pub enum StreamScanType {
1947    Unspecified = 0,
1948    /// ChainExecutor
1949    Chain = 1,
1950    /// RearrangedChainExecutor
1951    Rearrange = 2,
1952    /// BackfillExecutor
1953    Backfill = 3,
1954    /// ChainExecutor with upstream_only = true
1955    UpstreamOnly = 4,
1956    /// ArrangementBackfillExecutor
1957    ArrangementBackfill = 5,
1958    /// SnapshotBackfillExecutor
1959    SnapshotBackfill = 6,
1960    /// SnapshotBackfillExecutor
1961    CrossDbSnapshotBackfill = 7,
1962}
1963impl StreamScanType {
1964    /// String value of the enum field names used in the ProtoBuf definition.
1965    ///
1966    /// The values are not transformed in any way and thus are considered stable
1967    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1968    pub fn as_str_name(&self) -> &'static str {
1969        match self {
1970            Self::Unspecified => "STREAM_SCAN_TYPE_UNSPECIFIED",
1971            Self::Chain => "STREAM_SCAN_TYPE_CHAIN",
1972            Self::Rearrange => "STREAM_SCAN_TYPE_REARRANGE",
1973            Self::Backfill => "STREAM_SCAN_TYPE_BACKFILL",
1974            Self::UpstreamOnly => "STREAM_SCAN_TYPE_UPSTREAM_ONLY",
1975            Self::ArrangementBackfill => "STREAM_SCAN_TYPE_ARRANGEMENT_BACKFILL",
1976            Self::SnapshotBackfill => "STREAM_SCAN_TYPE_SNAPSHOT_BACKFILL",
1977            Self::CrossDbSnapshotBackfill => {
1978                "STREAM_SCAN_TYPE_CROSS_DB_SNAPSHOT_BACKFILL"
1979            }
1980        }
1981    }
1982    /// Creates an enum from field names used in the ProtoBuf definition.
1983    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1984        match value {
1985            "STREAM_SCAN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1986            "STREAM_SCAN_TYPE_CHAIN" => Some(Self::Chain),
1987            "STREAM_SCAN_TYPE_REARRANGE" => Some(Self::Rearrange),
1988            "STREAM_SCAN_TYPE_BACKFILL" => Some(Self::Backfill),
1989            "STREAM_SCAN_TYPE_UPSTREAM_ONLY" => Some(Self::UpstreamOnly),
1990            "STREAM_SCAN_TYPE_ARRANGEMENT_BACKFILL" => Some(Self::ArrangementBackfill),
1991            "STREAM_SCAN_TYPE_SNAPSHOT_BACKFILL" => Some(Self::SnapshotBackfill),
1992            "STREAM_SCAN_TYPE_CROSS_DB_SNAPSHOT_BACKFILL" => {
1993                Some(Self::CrossDbSnapshotBackfill)
1994            }
1995            _ => None,
1996        }
1997    }
1998}
1999#[derive(prost_helpers::AnyPB)]
2000#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2001#[repr(i32)]
2002pub enum OverWindowCachePolicy {
2003    Unspecified = 0,
2004    Full = 1,
2005    Recent = 2,
2006    RecentFirstN = 3,
2007    RecentLastN = 4,
2008}
2009impl OverWindowCachePolicy {
2010    /// String value of the enum field names used in the ProtoBuf definition.
2011    ///
2012    /// The values are not transformed in any way and thus are considered stable
2013    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2014    pub fn as_str_name(&self) -> &'static str {
2015        match self {
2016            Self::Unspecified => "OVER_WINDOW_CACHE_POLICY_UNSPECIFIED",
2017            Self::Full => "OVER_WINDOW_CACHE_POLICY_FULL",
2018            Self::Recent => "OVER_WINDOW_CACHE_POLICY_RECENT",
2019            Self::RecentFirstN => "OVER_WINDOW_CACHE_POLICY_RECENT_FIRST_N",
2020            Self::RecentLastN => "OVER_WINDOW_CACHE_POLICY_RECENT_LAST_N",
2021        }
2022    }
2023    /// Creates an enum from field names used in the ProtoBuf definition.
2024    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2025        match value {
2026            "OVER_WINDOW_CACHE_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
2027            "OVER_WINDOW_CACHE_POLICY_FULL" => Some(Self::Full),
2028            "OVER_WINDOW_CACHE_POLICY_RECENT" => Some(Self::Recent),
2029            "OVER_WINDOW_CACHE_POLICY_RECENT_FIRST_N" => Some(Self::RecentFirstN),
2030            "OVER_WINDOW_CACHE_POLICY_RECENT_LAST_N" => Some(Self::RecentLastN),
2031            _ => None,
2032        }
2033    }
2034}
2035#[derive(prost_helpers::AnyPB)]
2036#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2037#[repr(i32)]
2038pub enum DispatcherType {
2039    Unspecified = 0,
2040    /// Dispatch by hash key, hashed by consistent hash.
2041    Hash = 1,
2042    /// Broadcast to all downstreams.
2043    ///
2044    /// Note a broadcast cannot be represented as multiple simple dispatchers, since they are
2045    /// different when we update dispatchers during scaling.
2046    Broadcast = 2,
2047    /// Only one downstream.
2048    Simple = 3,
2049    /// A special kind of exchange that doesn't involve shuffle. The upstream actor will be directly
2050    /// piped into the downstream actor, if there are the same number of actors. If number of actors
2051    /// are not the same, should use hash instead. Should be only used when distribution is the same.
2052    NoShuffle = 4,
2053}
2054impl DispatcherType {
2055    /// String value of the enum field names used in the ProtoBuf definition.
2056    ///
2057    /// The values are not transformed in any way and thus are considered stable
2058    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2059    pub fn as_str_name(&self) -> &'static str {
2060        match self {
2061            Self::Unspecified => "DISPATCHER_TYPE_UNSPECIFIED",
2062            Self::Hash => "DISPATCHER_TYPE_HASH",
2063            Self::Broadcast => "DISPATCHER_TYPE_BROADCAST",
2064            Self::Simple => "DISPATCHER_TYPE_SIMPLE",
2065            Self::NoShuffle => "DISPATCHER_TYPE_NO_SHUFFLE",
2066        }
2067    }
2068    /// Creates an enum from field names used in the ProtoBuf definition.
2069    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2070        match value {
2071            "DISPATCHER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2072            "DISPATCHER_TYPE_HASH" => Some(Self::Hash),
2073            "DISPATCHER_TYPE_BROADCAST" => Some(Self::Broadcast),
2074            "DISPATCHER_TYPE_SIMPLE" => Some(Self::Simple),
2075            "DISPATCHER_TYPE_NO_SHUFFLE" => Some(Self::NoShuffle),
2076            _ => None,
2077        }
2078    }
2079}