risingwave_pb/
stream_plan.rs

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