risingwave_pb/
stream_plan.rs

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