risingwave_pb/
stream_plan.rs

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