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    /// Full scan range pushdown (eq_conds + range bounds on PK).
1238    #[prost(message, optional, tag = "13")]
1239    pub pk_scan_range: ::core::option::Option<super::batch_plan::ScanRange>,
1240}
1241/// Config options for CDC backfill
1242#[derive(prost_helpers::AnyPB)]
1243#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1244pub struct StreamCdcScanOptions {
1245    /// Whether skip the backfill and only consume from upstream.
1246    #[prost(bool, tag = "1")]
1247    pub disable_backfill: bool,
1248    #[prost(uint32, tag = "2")]
1249    pub snapshot_barrier_interval: u32,
1250    #[prost(uint32, tag = "3")]
1251    pub snapshot_batch_size: u32,
1252    #[prost(uint32, tag = "4")]
1253    pub backfill_parallelism: u32,
1254    #[prost(uint64, tag = "5")]
1255    pub backfill_num_rows_per_split: u64,
1256    #[prost(bool, tag = "6")]
1257    pub backfill_as_even_splits: bool,
1258    #[prost(uint32, tag = "7")]
1259    pub backfill_split_pk_column_index: u32,
1260}
1261#[derive(prost_helpers::AnyPB)]
1262#[derive(Clone, PartialEq, ::prost::Message)]
1263pub struct StreamCdcScanNode {
1264    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
1265    pub table_id: crate::id::TableId,
1266    /// The columns from the upstream table that'll be internally required by this stream scan node.
1267    /// Contains Primary Keys and Output columns.
1268    #[prost(int32, repeated, tag = "2")]
1269    pub upstream_column_ids: ::prost::alloc::vec::Vec<i32>,
1270    /// Strips the primary key columns if they're unnecessary.
1271    #[prost(uint32, repeated, tag = "3")]
1272    pub output_indices: ::prost::alloc::vec::Vec<u32>,
1273    /// The state table used by CdcBackfill operator for persisting internal state
1274    #[prost(message, optional, tag = "4")]
1275    pub state_table: ::core::option::Option<super::catalog::Table>,
1276    /// The external table that will be backfilled for CDC.
1277    #[prost(message, optional, tag = "5")]
1278    pub cdc_table_desc: ::core::option::Option<super::plan_common::ExternalTableDesc>,
1279    /// The backfill rate limit for the stream cdc scan node.
1280    #[prost(uint32, optional, tag = "6")]
1281    pub rate_limit: ::core::option::Option<u32>,
1282    /// Whether skip the backfill and only consume from upstream.
1283    /// keep it for backward compatibility, new stream plan will use `options.disable_backfill`
1284    #[prost(bool, tag = "7")]
1285    pub disable_backfill: bool,
1286    #[prost(message, optional, tag = "8")]
1287    pub options: ::core::option::Option<StreamCdcScanOptions>,
1288}
1289/// BatchPlanNode is used for mv on mv snapshot read.
1290/// BatchPlanNode is supposed to carry a batch plan that can be optimized with the streaming plan_common.
1291/// Currently, streaming to batch push down is not yet supported, BatchPlanNode is simply a table scan.
1292#[derive(prost_helpers::AnyPB)]
1293#[derive(Clone, PartialEq, ::prost::Message)]
1294pub struct BatchPlanNode {
1295    #[prost(message, optional, tag = "1")]
1296    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
1297    #[prost(int32, repeated, tag = "2")]
1298    pub column_ids: ::prost::alloc::vec::Vec<i32>,
1299}
1300#[derive(prost_helpers::AnyPB)]
1301#[derive(Clone, PartialEq, ::prost::Message)]
1302pub struct ArrangementInfo {
1303    /// Order key of the arrangement, including order by columns and pk from the materialize
1304    /// executor.
1305    #[prost(message, repeated, tag = "1")]
1306    pub arrange_key_orders: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1307    /// Column descs of the arrangement
1308    #[prost(message, repeated, tag = "2")]
1309    pub column_descs: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
1310    /// Used to build storage table by stream lookup join of delta join.
1311    #[prost(message, optional, tag = "4")]
1312    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
1313    /// Output index columns
1314    #[prost(uint32, repeated, tag = "5")]
1315    pub output_col_idx: ::prost::alloc::vec::Vec<u32>,
1316}
1317/// Special node for shared state, which will only be produced in fragmenter. ArrangeNode will
1318/// produce a special Materialize executor, which materializes data for downstream to query.
1319#[derive(prost_helpers::AnyPB)]
1320#[derive(Clone, PartialEq, ::prost::Message)]
1321pub struct ArrangeNode {
1322    /// Info about the arrangement
1323    #[prost(message, optional, tag = "1")]
1324    pub table_info: ::core::option::Option<ArrangementInfo>,
1325    /// Hash key of the materialize node, which is a subset of pk.
1326    #[prost(uint32, repeated, tag = "2")]
1327    pub distribution_key: ::prost::alloc::vec::Vec<u32>,
1328    /// Used for internal table states.
1329    #[prost(message, optional, tag = "3")]
1330    pub table: ::core::option::Option<super::catalog::Table>,
1331}
1332/// Special node for shared state. LookupNode will join an arrangement with a stream.
1333#[derive(prost_helpers::AnyPB)]
1334#[derive(Clone, PartialEq, ::prost::Message)]
1335pub struct LookupNode {
1336    /// Join key of the arrangement side
1337    #[prost(int32, repeated, tag = "1")]
1338    pub arrange_key: ::prost::alloc::vec::Vec<i32>,
1339    /// Join key of the stream side
1340    #[prost(int32, repeated, tag = "2")]
1341    pub stream_key: ::prost::alloc::vec::Vec<i32>,
1342    /// Whether to join the current epoch of arrangement
1343    #[prost(bool, tag = "3")]
1344    pub use_current_epoch: bool,
1345    /// Sometimes we need to re-order the output data to meet the requirement of schema.
1346    /// By default, lookup executor will produce `<arrangement side, stream side>`. We
1347    /// will then apply the column mapping to the combined result.
1348    #[prost(int32, repeated, tag = "4")]
1349    pub column_mapping: ::prost::alloc::vec::Vec<i32>,
1350    /// Info about the arrangement
1351    #[prost(message, optional, tag = "7")]
1352    pub arrangement_table_info: ::core::option::Option<ArrangementInfo>,
1353    #[prost(oneof = "lookup_node::ArrangementTableId", tags = "5, 6")]
1354    pub arrangement_table_id: ::core::option::Option<lookup_node::ArrangementTableId>,
1355}
1356/// Nested message and enum types in `LookupNode`.
1357pub mod lookup_node {
1358    #[derive(prost_helpers::AnyPB)]
1359    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
1360    pub enum ArrangementTableId {
1361        /// Table Id of the arrangement (when created along with join plan)
1362        #[prost(uint32, tag = "5", wrapper = "crate::id::TableId")]
1363        TableId(crate::id::TableId),
1364        /// Table Id of the arrangement (when using index)
1365        #[prost(uint32, tag = "6", wrapper = "crate::id::TableId")]
1366        IndexId(crate::id::TableId),
1367    }
1368}
1369/// WatermarkFilter needs to filter the upstream data by the water mark.
1370#[derive(prost_helpers::AnyPB)]
1371#[derive(Clone, PartialEq, ::prost::Message)]
1372pub struct WatermarkFilterNode {
1373    /// The watermark descs
1374    #[prost(message, repeated, tag = "1")]
1375    pub watermark_descs: ::prost::alloc::vec::Vec<super::catalog::WatermarkDesc>,
1376    /// The tables used to persist watermarks, the key is vnode.
1377    #[prost(message, repeated, tag = "2")]
1378    pub tables: ::prost::alloc::vec::Vec<super::catalog::Table>,
1379}
1380/// Acts like a merger, but on different inputs.
1381#[derive(prost_helpers::AnyPB)]
1382#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1383pub struct UnionNode {}
1384/// Special node for shared state. Merge and align barrier from upstreams. Pipe inputs in order.
1385#[derive(prost_helpers::AnyPB)]
1386#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1387pub struct LookupUnionNode {
1388    #[prost(uint32, repeated, tag = "1")]
1389    pub order: ::prost::alloc::vec::Vec<u32>,
1390}
1391#[derive(prost_helpers::AnyPB)]
1392#[derive(Clone, PartialEq, ::prost::Message)]
1393pub struct ExpandNode {
1394    #[prost(message, repeated, tag = "1")]
1395    pub column_subsets: ::prost::alloc::vec::Vec<expand_node::Subset>,
1396}
1397/// Nested message and enum types in `ExpandNode`.
1398pub mod expand_node {
1399    #[derive(prost_helpers::AnyPB)]
1400    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1401    pub struct Subset {
1402        #[prost(uint32, repeated, tag = "1")]
1403        pub column_indices: ::prost::alloc::vec::Vec<u32>,
1404    }
1405}
1406#[derive(prost_helpers::AnyPB)]
1407#[derive(Clone, PartialEq, ::prost::Message)]
1408pub struct ProjectSetNode {
1409    #[prost(message, repeated, tag = "1")]
1410    pub select_list: ::prost::alloc::vec::Vec<super::expr::ProjectSetSelectItem>,
1411    /// this two field is expressing a list of usize pair, which means when project receives a
1412    /// watermark with `watermark_input_cols\[i\]` column index, it should derive a new watermark
1413    /// with `watermark_output_cols\[i\]`th expression
1414    #[prost(uint32, repeated, tag = "2")]
1415    pub watermark_input_cols: ::prost::alloc::vec::Vec<u32>,
1416    #[prost(uint32, repeated, tag = "3")]
1417    pub watermark_expr_indices: ::prost::alloc::vec::Vec<u32>,
1418    #[prost(uint32, repeated, tag = "4")]
1419    pub nondecreasing_exprs: ::prost::alloc::vec::Vec<u32>,
1420}
1421/// Sorts inputs and outputs ordered data based on watermark.
1422#[derive(prost_helpers::AnyPB)]
1423#[derive(Clone, PartialEq, ::prost::Message)]
1424pub struct SortNode {
1425    /// Persists data above watermark.
1426    #[prost(message, optional, tag = "1")]
1427    pub state_table: ::core::option::Option<super::catalog::Table>,
1428    /// Column index of watermark to perform sorting.
1429    #[prost(uint32, tag = "2")]
1430    pub sort_column_index: u32,
1431}
1432/// Merges two streams from streaming and batch for data manipulation.
1433#[derive(prost_helpers::AnyPB)]
1434#[derive(Clone, PartialEq, ::prost::Message)]
1435pub struct DmlNode {
1436    /// Id of the table on which DML performs.
1437    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
1438    pub table_id: crate::id::TableId,
1439    /// Version of the table.
1440    #[prost(uint64, tag = "3")]
1441    pub table_version_id: u64,
1442    /// Column descriptions of the table.
1443    #[prost(message, repeated, tag = "2")]
1444    pub column_descs: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
1445    #[prost(uint32, optional, tag = "4")]
1446    pub rate_limit: ::core::option::Option<u32>,
1447}
1448#[derive(prost_helpers::AnyPB)]
1449#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1450pub struct RowIdGenNode {
1451    #[prost(uint64, tag = "1")]
1452    pub row_id_index: u64,
1453}
1454#[derive(prost_helpers::AnyPB)]
1455#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1456pub struct NowModeUpdateCurrent {}
1457#[derive(prost_helpers::AnyPB)]
1458#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1459pub struct NowModeGenerateSeries {
1460    #[prost(message, optional, tag = "1")]
1461    pub start_timestamp: ::core::option::Option<super::data::Datum>,
1462    #[prost(message, optional, tag = "2")]
1463    pub interval: ::core::option::Option<super::data::Datum>,
1464}
1465#[derive(prost_helpers::AnyPB)]
1466#[derive(Clone, PartialEq, ::prost::Message)]
1467pub struct NowNode {
1468    /// Persists emitted 'now'.
1469    #[prost(message, optional, tag = "1")]
1470    pub state_table: ::core::option::Option<super::catalog::Table>,
1471    #[prost(oneof = "now_node::Mode", tags = "101, 102")]
1472    pub mode: ::core::option::Option<now_node::Mode>,
1473}
1474/// Nested message and enum types in `NowNode`.
1475pub mod now_node {
1476    #[derive(prost_helpers::AnyPB)]
1477    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1478    pub enum Mode {
1479        #[prost(message, tag = "101")]
1480        UpdateCurrent(super::NowModeUpdateCurrent),
1481        #[prost(message, tag = "102")]
1482        GenerateSeries(super::NowModeGenerateSeries),
1483    }
1484}
1485#[derive(prost_helpers::AnyPB)]
1486#[derive(Clone, PartialEq, ::prost::Message)]
1487pub struct ValuesNode {
1488    #[prost(message, repeated, tag = "1")]
1489    pub tuples: ::prost::alloc::vec::Vec<values_node::ExprTuple>,
1490    #[prost(message, repeated, tag = "2")]
1491    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
1492}
1493/// Nested message and enum types in `ValuesNode`.
1494pub mod values_node {
1495    #[derive(prost_helpers::AnyPB)]
1496    #[derive(Clone, PartialEq, ::prost::Message)]
1497    pub struct ExprTuple {
1498        #[prost(message, repeated, tag = "1")]
1499        pub cells: ::prost::alloc::vec::Vec<super::super::expr::ExprNode>,
1500    }
1501}
1502#[derive(prost_helpers::AnyPB)]
1503#[derive(Clone, PartialEq, ::prost::Message)]
1504pub struct DedupNode {
1505    #[prost(message, optional, tag = "1")]
1506    pub state_table: ::core::option::Option<super::catalog::Table>,
1507    #[prost(uint32, repeated, tag = "2")]
1508    pub dedup_column_indices: ::prost::alloc::vec::Vec<u32>,
1509}
1510#[derive(prost_helpers::AnyPB)]
1511#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1512pub struct NoOpNode {}
1513#[derive(prost_helpers::AnyPB)]
1514#[derive(Clone, PartialEq, ::prost::Message)]
1515pub struct EowcOverWindowNode {
1516    #[prost(message, repeated, tag = "1")]
1517    pub calls: ::prost::alloc::vec::Vec<super::expr::WindowFunction>,
1518    #[prost(uint32, repeated, tag = "2")]
1519    pub partition_by: ::prost::alloc::vec::Vec<u32>,
1520    /// use `repeated` in case of future extension, now only one column is allowed
1521    #[prost(message, repeated, tag = "3")]
1522    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1523    #[prost(message, optional, tag = "4")]
1524    pub state_table: ::core::option::Option<super::catalog::Table>,
1525    /// Optional state table for persisting window function intermediate states.
1526    /// Currently used for numbering functions (row_number/rank/dense_rank).
1527    #[prost(message, optional, tag = "5")]
1528    pub intermediate_state_table: ::core::option::Option<super::catalog::Table>,
1529}
1530#[derive(prost_helpers::AnyPB)]
1531#[derive(Clone, PartialEq, ::prost::Message)]
1532pub struct OverWindowNode {
1533    #[prost(message, repeated, tag = "1")]
1534    pub calls: ::prost::alloc::vec::Vec<super::expr::WindowFunction>,
1535    #[prost(uint32, repeated, tag = "2")]
1536    pub partition_by: ::prost::alloc::vec::Vec<u32>,
1537    #[prost(message, repeated, tag = "3")]
1538    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1539    #[prost(message, optional, tag = "4")]
1540    pub state_table: ::core::option::Option<super::catalog::Table>,
1541    /// Deprecated. Use the one from `StreamingDeveloperConfig` instead.
1542    #[deprecated]
1543    #[prost(enumeration = "OverWindowCachePolicy", tag = "5")]
1544    pub cache_policy: i32,
1545}
1546#[derive(prost_helpers::AnyPB)]
1547#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1548pub struct LocalApproxPercentileNode {
1549    #[prost(double, tag = "1")]
1550    pub base: f64,
1551    #[prost(uint32, tag = "2")]
1552    pub percentile_index: u32,
1553}
1554#[derive(prost_helpers::AnyPB)]
1555#[derive(Clone, PartialEq, ::prost::Message)]
1556pub struct GlobalApproxPercentileNode {
1557    #[prost(double, tag = "1")]
1558    pub base: f64,
1559    #[prost(double, tag = "2")]
1560    pub quantile: f64,
1561    #[prost(message, optional, tag = "3")]
1562    pub bucket_state_table: ::core::option::Option<super::catalog::Table>,
1563    #[prost(message, optional, tag = "4")]
1564    pub count_state_table: ::core::option::Option<super::catalog::Table>,
1565}
1566#[derive(prost_helpers::AnyPB)]
1567#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1568pub struct RowMergeNode {
1569    #[prost(message, optional, tag = "1")]
1570    pub lhs_mapping: ::core::option::Option<super::catalog::ColIndexMapping>,
1571    #[prost(message, optional, tag = "2")]
1572    pub rhs_mapping: ::core::option::Option<super::catalog::ColIndexMapping>,
1573}
1574#[derive(prost_helpers::AnyPB)]
1575#[derive(Clone, PartialEq, ::prost::Message)]
1576pub struct SyncLogStoreNode {
1577    #[prost(message, optional, tag = "1")]
1578    pub log_store_table: ::core::option::Option<super::catalog::Table>,
1579    /// Deprecated. Use the one from `StreamingDeveloperConfig` instead.
1580    #[deprecated]
1581    #[prost(uint32, optional, tag = "2")]
1582    pub pause_duration_ms: ::core::option::Option<u32>,
1583    /// Deprecated. Use the one from `StreamingDeveloperConfig` instead.
1584    #[deprecated]
1585    #[prost(uint32, optional, tag = "3")]
1586    pub buffer_size: ::core::option::Option<u32>,
1587    #[prost(bool, tag = "4")]
1588    pub aligned: bool,
1589}
1590#[derive(prost_helpers::AnyPB)]
1591#[derive(Clone, PartialEq, ::prost::Message)]
1592pub struct MaterializedExprsNode {
1593    #[prost(message, repeated, tag = "1")]
1594    pub exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
1595    #[prost(message, optional, tag = "2")]
1596    pub state_table: ::core::option::Option<super::catalog::Table>,
1597    #[prost(uint32, optional, tag = "3")]
1598    pub state_clean_col_idx: ::core::option::Option<u32>,
1599}
1600#[derive(prost_helpers::AnyPB)]
1601#[derive(Clone, PartialEq, ::prost::Message)]
1602pub struct VectorIndexWriteNode {
1603    #[prost(message, optional, tag = "1")]
1604    pub table: ::core::option::Option<super::catalog::Table>,
1605}
1606#[derive(prost_helpers::AnyPB)]
1607#[derive(Clone, PartialEq, ::prost::Message)]
1608pub struct VectorIndexLookupJoinNode {
1609    #[prost(message, optional, tag = "1")]
1610    pub reader_desc: ::core::option::Option<super::plan_common::VectorIndexReaderDesc>,
1611    #[prost(uint32, tag = "2")]
1612    pub vector_column_idx: u32,
1613}
1614#[derive(prost_helpers::AnyPB)]
1615#[derive(Clone, PartialEq, ::prost::Message)]
1616pub struct UpstreamSinkUnionNode {
1617    /// It is always empty in the persisted metadata, and get filled before we spawn the actors.
1618    /// The actual upstream info may be added and removed dynamically at runtime.
1619    #[prost(message, repeated, tag = "1")]
1620    pub init_upstreams: ::prost::alloc::vec::Vec<UpstreamSinkInfo>,
1621}
1622#[derive(prost_helpers::AnyPB)]
1623#[derive(Clone, PartialEq, ::prost::Message)]
1624pub struct LocalityProviderNode {
1625    /// Column indices that define locality
1626    #[prost(uint32, repeated, tag = "1")]
1627    pub locality_columns: ::prost::alloc::vec::Vec<u32>,
1628    /// State table for buffering input data
1629    #[prost(message, optional, tag = "2")]
1630    pub state_table: ::core::option::Option<super::catalog::Table>,
1631    /// Progress table for tracking backfill progress
1632    #[prost(message, optional, tag = "3")]
1633    pub progress_table: ::core::option::Option<super::catalog::Table>,
1634}
1635#[derive(prost_helpers::AnyPB)]
1636#[derive(Clone, PartialEq, ::prost::Message)]
1637pub struct EowcGapFillNode {
1638    #[prost(uint32, tag = "1")]
1639    pub time_column_index: u32,
1640    #[prost(message, optional, tag = "2")]
1641    pub interval: ::core::option::Option<super::expr::ExprNode>,
1642    #[prost(uint32, repeated, tag = "3")]
1643    pub fill_columns: ::prost::alloc::vec::Vec<u32>,
1644    #[prost(string, repeated, tag = "4")]
1645    pub fill_strategies: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1646    #[prost(message, optional, tag = "5")]
1647    pub buffer_table: ::core::option::Option<super::catalog::Table>,
1648    #[prost(message, optional, tag = "6")]
1649    pub prev_row_table: ::core::option::Option<super::catalog::Table>,
1650}
1651#[derive(prost_helpers::AnyPB)]
1652#[derive(Clone, PartialEq, ::prost::Message)]
1653pub struct GapFillNode {
1654    #[prost(uint32, tag = "1")]
1655    pub time_column_index: u32,
1656    #[prost(message, optional, tag = "2")]
1657    pub interval: ::core::option::Option<super::expr::ExprNode>,
1658    #[prost(uint32, repeated, tag = "3")]
1659    pub fill_columns: ::prost::alloc::vec::Vec<u32>,
1660    #[prost(string, repeated, tag = "4")]
1661    pub fill_strategies: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1662    #[prost(message, optional, tag = "5")]
1663    pub state_table: ::core::option::Option<super::catalog::Table>,
1664}
1665#[derive(prost_helpers::AnyPB)]
1666#[derive(Clone, PartialEq, ::prost::Message)]
1667pub struct StreamNode {
1668    /// The id for the operator. This is local per mview.
1669    /// TODO: should better be a uint32.
1670    #[prost(uint64, tag = "1", wrapper = "crate::id::StreamNodeLocalOperatorId")]
1671    pub operator_id: crate::id::StreamNodeLocalOperatorId,
1672    /// Child node in plan aka. upstream nodes in the streaming DAG
1673    #[prost(message, repeated, tag = "3")]
1674    pub input: ::prost::alloc::vec::Vec<StreamNode>,
1675    #[prost(uint32, repeated, tag = "2")]
1676    pub stream_key: ::prost::alloc::vec::Vec<u32>,
1677    #[prost(enumeration = "stream_node::StreamKind", tag = "24")]
1678    pub stream_kind: i32,
1679    #[prost(string, tag = "18")]
1680    pub identity: ::prost::alloc::string::String,
1681    /// The schema of the plan node
1682    #[prost(message, repeated, tag = "19")]
1683    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
1684    #[prost(
1685        oneof = "stream_node::NodeBody",
1686        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"
1687    )]
1688    pub node_body: ::core::option::Option<stream_node::NodeBody>,
1689}
1690/// Nested message and enum types in `StreamNode`.
1691pub mod stream_node {
1692    /// This field used to be a `bool append_only`.
1693    /// Enum variants are ordered for backwards compatibility.
1694    #[derive(prost_helpers::AnyPB)]
1695    #[derive(
1696        Clone,
1697        Copy,
1698        Debug,
1699        PartialEq,
1700        Eq,
1701        Hash,
1702        PartialOrd,
1703        Ord,
1704        ::prost::Enumeration
1705    )]
1706    #[repr(i32)]
1707    pub enum StreamKind {
1708        /// buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
1709        Retract = 0,
1710        AppendOnly = 1,
1711        Upsert = 2,
1712    }
1713    impl StreamKind {
1714        /// String value of the enum field names used in the ProtoBuf definition.
1715        ///
1716        /// The values are not transformed in any way and thus are considered stable
1717        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1718        pub fn as_str_name(&self) -> &'static str {
1719            match self {
1720                Self::Retract => "STREAM_KIND_RETRACT",
1721                Self::AppendOnly => "STREAM_KIND_APPEND_ONLY",
1722                Self::Upsert => "STREAM_KIND_UPSERT",
1723            }
1724        }
1725        /// Creates an enum from field names used in the ProtoBuf definition.
1726        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1727            match value {
1728                "STREAM_KIND_RETRACT" => Some(Self::Retract),
1729                "STREAM_KIND_APPEND_ONLY" => Some(Self::AppendOnly),
1730                "STREAM_KIND_UPSERT" => Some(Self::Upsert),
1731                _ => None,
1732            }
1733        }
1734    }
1735    #[derive(prost_helpers::AnyPB)]
1736    #[derive(::enum_as_inner::EnumAsInner, ::strum::Display, ::strum::EnumDiscriminants)]
1737    #[strum_discriminants(derive(::strum::Display, Hash))]
1738    #[derive(Clone, PartialEq, ::prost::Oneof)]
1739    pub enum NodeBody {
1740        #[prost(message, tag = "100")]
1741        Source(::prost::alloc::boxed::Box<super::SourceNode>),
1742        #[prost(message, tag = "101")]
1743        Project(::prost::alloc::boxed::Box<super::ProjectNode>),
1744        #[prost(message, tag = "102")]
1745        Filter(::prost::alloc::boxed::Box<super::FilterNode>),
1746        #[prost(message, tag = "103")]
1747        Materialize(::prost::alloc::boxed::Box<super::MaterializeNode>),
1748        #[prost(message, tag = "104")]
1749        StatelessSimpleAgg(::prost::alloc::boxed::Box<super::SimpleAggNode>),
1750        #[prost(message, tag = "105")]
1751        SimpleAgg(::prost::alloc::boxed::Box<super::SimpleAggNode>),
1752        #[prost(message, tag = "106")]
1753        HashAgg(::prost::alloc::boxed::Box<super::HashAggNode>),
1754        #[prost(message, tag = "107")]
1755        AppendOnlyTopN(::prost::alloc::boxed::Box<super::TopNNode>),
1756        #[prost(message, tag = "108")]
1757        HashJoin(::prost::alloc::boxed::Box<super::HashJoinNode>),
1758        #[prost(message, tag = "109")]
1759        TopN(::prost::alloc::boxed::Box<super::TopNNode>),
1760        #[prost(message, tag = "110")]
1761        HopWindow(::prost::alloc::boxed::Box<super::HopWindowNode>),
1762        #[prost(message, tag = "111")]
1763        Merge(::prost::alloc::boxed::Box<super::MergeNode>),
1764        #[prost(message, tag = "112")]
1765        Exchange(::prost::alloc::boxed::Box<super::ExchangeNode>),
1766        #[prost(message, tag = "113")]
1767        StreamScan(::prost::alloc::boxed::Box<super::StreamScanNode>),
1768        #[prost(message, tag = "114")]
1769        BatchPlan(::prost::alloc::boxed::Box<super::BatchPlanNode>),
1770        #[prost(message, tag = "115")]
1771        Lookup(::prost::alloc::boxed::Box<super::LookupNode>),
1772        #[prost(message, tag = "116")]
1773        Arrange(::prost::alloc::boxed::Box<super::ArrangeNode>),
1774        #[prost(message, tag = "117")]
1775        LookupUnion(::prost::alloc::boxed::Box<super::LookupUnionNode>),
1776        #[prost(message, tag = "118")]
1777        Union(super::UnionNode),
1778        #[prost(message, tag = "119")]
1779        DeltaIndexJoin(::prost::alloc::boxed::Box<super::DeltaIndexJoinNode>),
1780        #[prost(message, tag = "120")]
1781        Sink(::prost::alloc::boxed::Box<super::SinkNode>),
1782        #[prost(message, tag = "121")]
1783        Expand(::prost::alloc::boxed::Box<super::ExpandNode>),
1784        #[prost(message, tag = "122")]
1785        DynamicFilter(::prost::alloc::boxed::Box<super::DynamicFilterNode>),
1786        #[prost(message, tag = "123")]
1787        ProjectSet(::prost::alloc::boxed::Box<super::ProjectSetNode>),
1788        #[prost(message, tag = "124")]
1789        GroupTopN(::prost::alloc::boxed::Box<super::GroupTopNNode>),
1790        #[prost(message, tag = "125")]
1791        Sort(::prost::alloc::boxed::Box<super::SortNode>),
1792        #[prost(message, tag = "126")]
1793        WatermarkFilter(::prost::alloc::boxed::Box<super::WatermarkFilterNode>),
1794        #[prost(message, tag = "127")]
1795        Dml(::prost::alloc::boxed::Box<super::DmlNode>),
1796        #[prost(message, tag = "128")]
1797        RowIdGen(::prost::alloc::boxed::Box<super::RowIdGenNode>),
1798        #[prost(message, tag = "129")]
1799        Now(::prost::alloc::boxed::Box<super::NowNode>),
1800        #[prost(message, tag = "130")]
1801        AppendOnlyGroupTopN(::prost::alloc::boxed::Box<super::GroupTopNNode>),
1802        #[prost(message, tag = "131")]
1803        TemporalJoin(::prost::alloc::boxed::Box<super::TemporalJoinNode>),
1804        #[prost(message, tag = "132")]
1805        BarrierRecv(::prost::alloc::boxed::Box<super::BarrierRecvNode>),
1806        #[prost(message, tag = "133")]
1807        Values(::prost::alloc::boxed::Box<super::ValuesNode>),
1808        #[prost(message, tag = "134")]
1809        AppendOnlyDedup(::prost::alloc::boxed::Box<super::DedupNode>),
1810        #[prost(message, tag = "135")]
1811        NoOp(super::NoOpNode),
1812        #[prost(message, tag = "136")]
1813        EowcOverWindow(::prost::alloc::boxed::Box<super::EowcOverWindowNode>),
1814        #[prost(message, tag = "137")]
1815        OverWindow(::prost::alloc::boxed::Box<super::OverWindowNode>),
1816        #[prost(message, tag = "138")]
1817        StreamFsFetch(::prost::alloc::boxed::Box<super::StreamFsFetchNode>),
1818        #[prost(message, tag = "139")]
1819        StreamCdcScan(::prost::alloc::boxed::Box<super::StreamCdcScanNode>),
1820        #[prost(message, tag = "140")]
1821        CdcFilter(::prost::alloc::boxed::Box<super::CdcFilterNode>),
1822        #[prost(message, tag = "142")]
1823        SourceBackfill(::prost::alloc::boxed::Box<super::SourceBackfillNode>),
1824        #[prost(message, tag = "143")]
1825        Changelog(::prost::alloc::boxed::Box<super::ChangeLogNode>),
1826        #[prost(message, tag = "144")]
1827        LocalApproxPercentile(
1828            ::prost::alloc::boxed::Box<super::LocalApproxPercentileNode>,
1829        ),
1830        #[prost(message, tag = "145")]
1831        GlobalApproxPercentile(
1832            ::prost::alloc::boxed::Box<super::GlobalApproxPercentileNode>,
1833        ),
1834        #[prost(message, tag = "146")]
1835        RowMerge(::prost::alloc::boxed::Box<super::RowMergeNode>),
1836        #[prost(message, tag = "147")]
1837        AsOfJoin(::prost::alloc::boxed::Box<super::AsOfJoinNode>),
1838        #[prost(message, tag = "148")]
1839        SyncLogStore(::prost::alloc::boxed::Box<super::SyncLogStoreNode>),
1840        #[prost(message, tag = "149")]
1841        MaterializedExprs(::prost::alloc::boxed::Box<super::MaterializedExprsNode>),
1842        #[prost(message, tag = "150")]
1843        VectorIndexWrite(::prost::alloc::boxed::Box<super::VectorIndexWriteNode>),
1844        #[prost(message, tag = "151")]
1845        UpstreamSinkUnion(::prost::alloc::boxed::Box<super::UpstreamSinkUnionNode>),
1846        #[prost(message, tag = "152")]
1847        LocalityProvider(::prost::alloc::boxed::Box<super::LocalityProviderNode>),
1848        #[prost(message, tag = "153")]
1849        EowcGapFill(::prost::alloc::boxed::Box<super::EowcGapFillNode>),
1850        #[prost(message, tag = "154")]
1851        GapFill(::prost::alloc::boxed::Box<super::GapFillNode>),
1852        #[prost(message, tag = "155")]
1853        VectorIndexLookupJoin(
1854            ::prost::alloc::boxed::Box<super::VectorIndexLookupJoinNode>,
1855        ),
1856        #[prost(message, tag = "156")]
1857        IcebergWithPkIndexWriter(
1858            ::prost::alloc::boxed::Box<super::IcebergWithPkIndexWriterNode>,
1859        ),
1860        #[prost(message, tag = "157")]
1861        IcebergWithPkIndexDvMerger(
1862            ::prost::alloc::boxed::Box<super::IcebergWithPkIndexDvMergerNode>,
1863        ),
1864    }
1865}
1866/// The method to map the upstream columns in the dispatcher before dispatching.
1867///
1868/// * For intra-job exchange, typically the upstream and downstream columns are the same. `indices`
1869///   will be `0..len` and `types` will be empty.
1870///
1871/// * For inter-job exchange,
1872///
1873///   * if the downstream only requires a subset of the upstream columns, `indices` will be the
1874///     indices of the required columns in the upstream columns.
1875///   * if some columns are added to the upstream, `indices` will help to maintain the same schema
1876///     from the view of the downstream.
1877///   * if some columns are altered to different (composite) types, `types` will be used to convert
1878///     the upstream columns to the downstream columns to maintain the same schema.
1879#[derive(prost_helpers::AnyPB)]
1880#[derive(Clone, PartialEq, ::prost::Message)]
1881pub struct DispatchOutputMapping {
1882    /// Indices of the columns to output.
1883    #[prost(uint32, repeated, tag = "1")]
1884    pub indices: ::prost::alloc::vec::Vec<u32>,
1885    /// Besides the indices, we may also need to convert the types of some columns.
1886    ///
1887    /// * If no type conversion is needed, this field will be empty.
1888    /// * If type conversion is needed, this will have the same length as `indices`. Only columns with
1889    ///   type conversion will have `upstream` and `downstream` field set.
1890    #[prost(message, repeated, tag = "2")]
1891    pub types: ::prost::alloc::vec::Vec<dispatch_output_mapping::TypePair>,
1892}
1893/// Nested message and enum types in `DispatchOutputMapping`.
1894pub mod dispatch_output_mapping {
1895    #[derive(prost_helpers::AnyPB)]
1896    #[derive(Clone, PartialEq, ::prost::Message)]
1897    pub struct TypePair {
1898        #[prost(message, optional, tag = "1")]
1899        pub upstream: ::core::option::Option<super::super::data::DataType>,
1900        #[prost(message, optional, tag = "2")]
1901        pub downstream: ::core::option::Option<super::super::data::DataType>,
1902    }
1903}
1904/// The property of an edge in the fragment graph.
1905/// This is essientially a "logical" version of `Dispatcher`. See the doc of `Dispatcher` for more details.
1906#[derive(prost_helpers::AnyPB)]
1907#[derive(Clone, PartialEq, ::prost::Message)]
1908pub struct DispatchStrategy {
1909    #[prost(enumeration = "DispatcherType", tag = "1")]
1910    pub r#type: i32,
1911    #[prost(uint32, repeated, tag = "2")]
1912    pub dist_key_indices: ::prost::alloc::vec::Vec<u32>,
1913    #[prost(message, optional, tag = "3")]
1914    pub output_mapping: ::core::option::Option<DispatchOutputMapping>,
1915}
1916/// A dispatcher redistribute messages.
1917/// We encode both the type and other usage information in the proto.
1918#[derive(prost_helpers::AnyPB)]
1919#[derive(Clone, PartialEq, ::prost::Message)]
1920pub struct Dispatcher {
1921    #[prost(enumeration = "DispatcherType", tag = "1")]
1922    pub r#type: i32,
1923    /// Indices of the columns to be used for hashing.
1924    /// For dispatcher types other than HASH, this is ignored.
1925    #[prost(uint32, repeated, tag = "2")]
1926    pub dist_key_indices: ::prost::alloc::vec::Vec<u32>,
1927    /// The method to map the upstream columns in the dispatcher before dispatching.
1928    #[prost(message, optional, tag = "6")]
1929    pub output_mapping: ::core::option::Option<DispatchOutputMapping>,
1930    /// The hash mapping for consistent hash.
1931    /// For dispatcher types other than HASH, this is ignored.
1932    #[prost(message, optional, tag = "3")]
1933    pub hash_mapping: ::core::option::Option<ActorMapping>,
1934    /// Dispatcher can be uniquely identified by a combination of actor id and dispatcher id.
1935    /// This is exactly the same as its downstream fragment id.
1936    #[prost(uint32, tag = "4", wrapper = "crate::id::FragmentId")]
1937    pub dispatcher_id: crate::id::FragmentId,
1938    /// Number of downstreams decides how many endpoints a dispatcher should dispatch.
1939    #[prost(uint32, repeated, tag = "5", wrapper = "crate::id::ActorId")]
1940    pub downstream_actor_id: ::prost::alloc::vec::Vec<crate::id::ActorId>,
1941}
1942/// A StreamActor is a running fragment of the overall stream graph,
1943#[derive(prost_helpers::AnyPB)]
1944#[derive(Clone, PartialEq, ::prost::Message)]
1945pub struct StreamActor {
1946    #[prost(uint32, tag = "1", wrapper = "crate::id::ActorId")]
1947    pub actor_id: crate::id::ActorId,
1948    #[prost(uint32, tag = "2", wrapper = "crate::id::FragmentId")]
1949    pub fragment_id: crate::id::FragmentId,
1950    #[prost(message, repeated, tag = "4")]
1951    pub dispatcher: ::prost::alloc::vec::Vec<Dispatcher>,
1952    /// Vnodes that the executors in this actor own.
1953    /// If the fragment is a singleton, this field will not be set and leave a `None`.
1954    #[prost(message, optional, tag = "8")]
1955    pub vnode_bitmap: ::core::option::Option<super::common::Buffer>,
1956    /// The SQL definition of this materialized view. Used for debugging only.
1957    #[prost(string, tag = "9")]
1958    pub mview_definition: ::prost::alloc::string::String,
1959    /// Provide the necessary context, e.g. session info like time zone, for the actor.
1960    #[prost(message, optional, tag = "10")]
1961    pub expr_context: ::core::option::Option<super::plan_common::ExprContext>,
1962    /// The config override for this actor.
1963    #[prost(string, tag = "11")]
1964    pub config_override: ::prost::alloc::string::String,
1965}
1966/// The streaming context associated with a stream plan
1967#[derive(prost_helpers::AnyPB)]
1968#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1969pub struct StreamContext {
1970    /// The timezone associated with the streaming plan. Only applies to MV for now.
1971    #[prost(string, tag = "1")]
1972    pub timezone: ::prost::alloc::string::String,
1973    /// The partial config of this job to override the global config.
1974    #[prost(string, tag = "2")]
1975    pub config_override: ::prost::alloc::string::String,
1976}
1977#[derive(prost_helpers::AnyPB)]
1978#[derive(Clone, PartialEq, ::prost::Message)]
1979pub struct BackfillOrder {
1980    #[prost(map = "uint32, message", tag = "1", wrapper = "crate::id::RelationId")]
1981    pub order: ::std::collections::HashMap<
1982        crate::id::RelationId,
1983        super::common::Uint32Vector,
1984    >,
1985}
1986/// Representation of a graph of stream fragments.
1987/// Generated by the fragmenter in the frontend, only used in DDL requests and never persisted.
1988///
1989/// For the persisted form, see `TableFragments`.
1990#[derive(prost_helpers::AnyPB)]
1991#[derive(Clone, PartialEq, ::prost::Message)]
1992pub struct StreamFragmentGraph {
1993    /// all the fragments in the graph.
1994    #[prost(map = "uint32, message", tag = "1", wrapper = "crate::id::FragmentId")]
1995    pub fragments: ::std::collections::HashMap<
1996        crate::id::FragmentId,
1997        stream_fragment_graph::StreamFragment,
1998    >,
1999    /// edges between fragments.
2000    #[prost(message, repeated, tag = "2")]
2001    pub edges: ::prost::alloc::vec::Vec<stream_fragment_graph::StreamFragmentEdge>,
2002    #[prost(uint32, repeated, tag = "3", wrapper = "crate::id::TableId")]
2003    pub dependent_table_ids: ::prost::alloc::vec::Vec<crate::id::TableId>,
2004    #[prost(uint32, tag = "4")]
2005    pub table_ids_cnt: u32,
2006    #[prost(message, optional, tag = "5")]
2007    pub ctx: ::core::option::Option<StreamContext>,
2008    /// If none, default parallelism will be applied.
2009    #[prost(message, optional, tag = "6")]
2010    pub parallelism: ::core::option::Option<stream_fragment_graph::Parallelism>,
2011    /// Parallelism to use during backfill. Falls back to `parallelism` if unset.
2012    #[prost(message, optional, tag = "9")]
2013    pub backfill_parallelism: ::core::option::Option<stream_fragment_graph::Parallelism>,
2014    /// The adaptive parallelism strategy for this streaming job, if explicitly set.
2015    #[prost(string, tag = "10")]
2016    pub adaptive_parallelism_strategy: ::prost::alloc::string::String,
2017    /// The adaptive parallelism strategy for the backfill override, if explicitly set.
2018    #[prost(string, tag = "11")]
2019    pub backfill_adaptive_parallelism_strategy: ::prost::alloc::string::String,
2020    /// Specified max parallelism, i.e., expected vnode count for the graph.
2021    ///
2022    /// The scheduler on the meta service will use this as a hint to decide the vnode count
2023    /// for each fragment.
2024    ///
2025    /// Note that the actual vnode count may be different from this value.
2026    /// For example, a no-shuffle exchange between current fragment graph and an existing
2027    /// upstream fragment graph requires two fragments to be in the same distribution,
2028    /// thus the same vnode count.
2029    #[prost(uint32, tag = "7")]
2030    pub max_parallelism: u32,
2031    /// The backfill order strategy for the fragments.
2032    #[prost(message, optional, tag = "8")]
2033    pub backfill_order: ::core::option::Option<BackfillOrder>,
2034}
2035/// Nested message and enum types in `StreamFragmentGraph`.
2036pub mod stream_fragment_graph {
2037    #[derive(prost_helpers::AnyPB)]
2038    #[derive(Clone, PartialEq, ::prost::Message)]
2039    pub struct StreamFragment {
2040        /// 0-based on frontend, and will be rewritten to global id on meta.
2041        #[prost(uint32, tag = "1", wrapper = "crate::id::FragmentId")]
2042        pub fragment_id: crate::id::FragmentId,
2043        /// root stream node in this fragment.
2044        #[prost(message, optional, tag = "2")]
2045        pub node: ::core::option::Option<super::StreamNode>,
2046        /// Bitwise-OR of `FragmentTypeFlag`s
2047        #[prost(uint32, tag = "3")]
2048        pub fragment_type_mask: u32,
2049        /// Mark whether this fragment requires exactly one actor.
2050        /// Note: if this is `false`, the fragment may still be a singleton according to the scheduler.
2051        /// One should check `meta.Fragment.distribution_type` for the final result.
2052        #[prost(bool, tag = "4")]
2053        pub requires_singleton: bool,
2054    }
2055    #[derive(prost_helpers::AnyPB)]
2056    #[derive(Clone, PartialEq, ::prost::Message)]
2057    pub struct StreamFragmentEdge {
2058        /// Dispatch strategy for the fragment.
2059        #[prost(message, optional, tag = "1")]
2060        pub dispatch_strategy: ::core::option::Option<super::DispatchStrategy>,
2061        /// A unique identifier of this edge. Generally it should be exchange node's operator id. When
2062        /// rewriting fragments into delta joins or when inserting 1-to-1 exchange, there will be
2063        /// virtual links generated.
2064        #[prost(uint64, tag = "3")]
2065        pub link_id: u64,
2066        #[prost(uint32, tag = "4", wrapper = "crate::id::FragmentId")]
2067        pub upstream_id: crate::id::FragmentId,
2068        #[prost(uint32, tag = "5", wrapper = "crate::id::FragmentId")]
2069        pub downstream_id: crate::id::FragmentId,
2070    }
2071    #[derive(prost_helpers::AnyPB)]
2072    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2073    pub struct Parallelism {
2074        #[prost(uint64, tag = "1")]
2075        pub parallelism: u64,
2076    }
2077}
2078/// Schema change operation for sink
2079#[derive(prost_helpers::AnyPB)]
2080#[derive(Clone, PartialEq, ::prost::Message)]
2081pub struct SinkSchemaChange {
2082    /// Original schema before this change.
2083    /// Used for validation and conflict detection.
2084    #[prost(message, repeated, tag = "1")]
2085    pub original_schema: ::prost::alloc::vec::Vec<super::plan_common::Field>,
2086    /// Schema change operation (mutually exclusive)
2087    #[prost(oneof = "sink_schema_change::Op", tags = "2, 3")]
2088    pub op: ::core::option::Option<sink_schema_change::Op>,
2089}
2090/// Nested message and enum types in `SinkSchemaChange`.
2091pub mod sink_schema_change {
2092    /// Schema change operation (mutually exclusive)
2093    #[derive(prost_helpers::AnyPB)]
2094    #[derive(Clone, PartialEq, ::prost::Oneof)]
2095    pub enum Op {
2096        /// Add new columns to the schema
2097        #[prost(message, tag = "2")]
2098        AddColumns(super::SinkAddColumnsOp),
2099        /// Drop columns from the schema
2100        #[prost(message, tag = "3")]
2101        DropColumns(super::SinkDropColumnsOp),
2102    }
2103}
2104/// Add columns operation
2105#[derive(prost_helpers::AnyPB)]
2106#[derive(Clone, PartialEq, ::prost::Message)]
2107pub struct SinkAddColumnsOp {
2108    /// Columns to add
2109    #[prost(message, repeated, tag = "1")]
2110    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
2111}
2112/// Drop columns operation
2113#[derive(prost_helpers::AnyPB)]
2114#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2115pub struct SinkDropColumnsOp {
2116    /// Column names to drop
2117    #[prost(string, repeated, tag = "1")]
2118    pub column_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2119}
2120#[derive(prost_helpers::AnyPB)]
2121#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2122#[repr(i32)]
2123pub enum SinkLogStoreType {
2124    /// / Default value is the normal in memory log store to be backward compatible with the previously unset value
2125    Unspecified = 0,
2126    KvLogStore = 1,
2127    InMemoryLogStore = 2,
2128}
2129impl SinkLogStoreType {
2130    /// String value of the enum field names used in the ProtoBuf definition.
2131    ///
2132    /// The values are not transformed in any way and thus are considered stable
2133    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2134    pub fn as_str_name(&self) -> &'static str {
2135        match self {
2136            Self::Unspecified => "SINK_LOG_STORE_TYPE_UNSPECIFIED",
2137            Self::KvLogStore => "SINK_LOG_STORE_TYPE_KV_LOG_STORE",
2138            Self::InMemoryLogStore => "SINK_LOG_STORE_TYPE_IN_MEMORY_LOG_STORE",
2139        }
2140    }
2141    /// Creates an enum from field names used in the ProtoBuf definition.
2142    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2143        match value {
2144            "SINK_LOG_STORE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2145            "SINK_LOG_STORE_TYPE_KV_LOG_STORE" => Some(Self::KvLogStore),
2146            "SINK_LOG_STORE_TYPE_IN_MEMORY_LOG_STORE" => Some(Self::InMemoryLogStore),
2147            _ => None,
2148        }
2149    }
2150}
2151#[derive(prost_helpers::AnyPB)]
2152#[derive(prost_helpers::Version)]
2153#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2154#[repr(i32)]
2155pub enum AggNodeVersion {
2156    Unspecified = 0,
2157    /// <https://github.com/risingwavelabs/risingwave/issues/12140#issuecomment-1776289808>
2158    Issue12140 = 1,
2159    /// <https://github.com/risingwavelabs/risingwave/issues/13465#issuecomment-1821016508>
2160    Issue13465 = 2,
2161}
2162impl AggNodeVersion {
2163    /// String value of the enum field names used in the ProtoBuf definition.
2164    ///
2165    /// The values are not transformed in any way and thus are considered stable
2166    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2167    pub fn as_str_name(&self) -> &'static str {
2168        match self {
2169            Self::Unspecified => "AGG_NODE_VERSION_UNSPECIFIED",
2170            Self::Issue12140 => "AGG_NODE_VERSION_ISSUE_12140",
2171            Self::Issue13465 => "AGG_NODE_VERSION_ISSUE_13465",
2172        }
2173    }
2174    /// Creates an enum from field names used in the ProtoBuf definition.
2175    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2176        match value {
2177            "AGG_NODE_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
2178            "AGG_NODE_VERSION_ISSUE_12140" => Some(Self::Issue12140),
2179            "AGG_NODE_VERSION_ISSUE_13465" => Some(Self::Issue13465),
2180            _ => None,
2181        }
2182    }
2183}
2184#[derive(prost_helpers::AnyPB)]
2185#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2186#[repr(i32)]
2187pub enum InequalityType {
2188    Unspecified = 0,
2189    LessThan = 1,
2190    LessThanOrEqual = 2,
2191    GreaterThan = 3,
2192    GreaterThanOrEqual = 4,
2193}
2194impl InequalityType {
2195    /// String value of the enum field names used in the ProtoBuf definition.
2196    ///
2197    /// The values are not transformed in any way and thus are considered stable
2198    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2199    pub fn as_str_name(&self) -> &'static str {
2200        match self {
2201            Self::Unspecified => "INEQUALITY_TYPE_UNSPECIFIED",
2202            Self::LessThan => "INEQUALITY_TYPE_LESS_THAN",
2203            Self::LessThanOrEqual => "INEQUALITY_TYPE_LESS_THAN_OR_EQUAL",
2204            Self::GreaterThan => "INEQUALITY_TYPE_GREATER_THAN",
2205            Self::GreaterThanOrEqual => "INEQUALITY_TYPE_GREATER_THAN_OR_EQUAL",
2206        }
2207    }
2208    /// Creates an enum from field names used in the ProtoBuf definition.
2209    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2210        match value {
2211            "INEQUALITY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2212            "INEQUALITY_TYPE_LESS_THAN" => Some(Self::LessThan),
2213            "INEQUALITY_TYPE_LESS_THAN_OR_EQUAL" => Some(Self::LessThanOrEqual),
2214            "INEQUALITY_TYPE_GREATER_THAN" => Some(Self::GreaterThan),
2215            "INEQUALITY_TYPE_GREATER_THAN_OR_EQUAL" => Some(Self::GreaterThanOrEqual),
2216            _ => None,
2217        }
2218    }
2219}
2220#[derive(prost_helpers::AnyPB)]
2221#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2222#[repr(i32)]
2223pub enum JoinEncodingType {
2224    Unspecified = 0,
2225    MemoryOptimized = 1,
2226    CpuOptimized = 2,
2227}
2228impl JoinEncodingType {
2229    /// String value of the enum field names used in the ProtoBuf definition.
2230    ///
2231    /// The values are not transformed in any way and thus are considered stable
2232    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2233    pub fn as_str_name(&self) -> &'static str {
2234        match self {
2235            Self::Unspecified => "UNSPECIFIED",
2236            Self::MemoryOptimized => "MEMORY_OPTIMIZED",
2237            Self::CpuOptimized => "CPU_OPTIMIZED",
2238        }
2239    }
2240    /// Creates an enum from field names used in the ProtoBuf definition.
2241    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2242        match value {
2243            "UNSPECIFIED" => Some(Self::Unspecified),
2244            "MEMORY_OPTIMIZED" => Some(Self::MemoryOptimized),
2245            "CPU_OPTIMIZED" => Some(Self::CpuOptimized),
2246            _ => None,
2247        }
2248    }
2249}
2250/// Decides which kind of Executor will be used
2251#[derive(prost_helpers::AnyPB)]
2252#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2253#[repr(i32)]
2254pub enum StreamScanType {
2255    Unspecified = 0,
2256    /// ChainExecutor
2257    Chain = 1,
2258    /// RearrangedChainExecutor
2259    Rearrange = 2,
2260    /// BackfillExecutor
2261    Backfill = 3,
2262    /// ChainExecutor with upstream_only = true
2263    UpstreamOnly = 4,
2264    /// ArrangementBackfillExecutor
2265    ArrangementBackfill = 5,
2266    /// SnapshotBackfillExecutor
2267    SnapshotBackfill = 6,
2268    /// SnapshotBackfillExecutor
2269    CrossDbSnapshotBackfill = 7,
2270}
2271impl StreamScanType {
2272    /// String value of the enum field names used in the ProtoBuf definition.
2273    ///
2274    /// The values are not transformed in any way and thus are considered stable
2275    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2276    pub fn as_str_name(&self) -> &'static str {
2277        match self {
2278            Self::Unspecified => "STREAM_SCAN_TYPE_UNSPECIFIED",
2279            Self::Chain => "STREAM_SCAN_TYPE_CHAIN",
2280            Self::Rearrange => "STREAM_SCAN_TYPE_REARRANGE",
2281            Self::Backfill => "STREAM_SCAN_TYPE_BACKFILL",
2282            Self::UpstreamOnly => "STREAM_SCAN_TYPE_UPSTREAM_ONLY",
2283            Self::ArrangementBackfill => "STREAM_SCAN_TYPE_ARRANGEMENT_BACKFILL",
2284            Self::SnapshotBackfill => "STREAM_SCAN_TYPE_SNAPSHOT_BACKFILL",
2285            Self::CrossDbSnapshotBackfill => {
2286                "STREAM_SCAN_TYPE_CROSS_DB_SNAPSHOT_BACKFILL"
2287            }
2288        }
2289    }
2290    /// Creates an enum from field names used in the ProtoBuf definition.
2291    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2292        match value {
2293            "STREAM_SCAN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2294            "STREAM_SCAN_TYPE_CHAIN" => Some(Self::Chain),
2295            "STREAM_SCAN_TYPE_REARRANGE" => Some(Self::Rearrange),
2296            "STREAM_SCAN_TYPE_BACKFILL" => Some(Self::Backfill),
2297            "STREAM_SCAN_TYPE_UPSTREAM_ONLY" => Some(Self::UpstreamOnly),
2298            "STREAM_SCAN_TYPE_ARRANGEMENT_BACKFILL" => Some(Self::ArrangementBackfill),
2299            "STREAM_SCAN_TYPE_SNAPSHOT_BACKFILL" => Some(Self::SnapshotBackfill),
2300            "STREAM_SCAN_TYPE_CROSS_DB_SNAPSHOT_BACKFILL" => {
2301                Some(Self::CrossDbSnapshotBackfill)
2302            }
2303            _ => None,
2304        }
2305    }
2306}
2307#[derive(prost_helpers::AnyPB)]
2308#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2309#[repr(i32)]
2310pub enum OverWindowCachePolicy {
2311    Unspecified = 0,
2312    Full = 1,
2313    Recent = 2,
2314    RecentFirstN = 3,
2315    RecentLastN = 4,
2316}
2317impl OverWindowCachePolicy {
2318    /// String value of the enum field names used in the ProtoBuf definition.
2319    ///
2320    /// The values are not transformed in any way and thus are considered stable
2321    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2322    pub fn as_str_name(&self) -> &'static str {
2323        match self {
2324            Self::Unspecified => "OVER_WINDOW_CACHE_POLICY_UNSPECIFIED",
2325            Self::Full => "OVER_WINDOW_CACHE_POLICY_FULL",
2326            Self::Recent => "OVER_WINDOW_CACHE_POLICY_RECENT",
2327            Self::RecentFirstN => "OVER_WINDOW_CACHE_POLICY_RECENT_FIRST_N",
2328            Self::RecentLastN => "OVER_WINDOW_CACHE_POLICY_RECENT_LAST_N",
2329        }
2330    }
2331    /// Creates an enum from field names used in the ProtoBuf definition.
2332    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2333        match value {
2334            "OVER_WINDOW_CACHE_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
2335            "OVER_WINDOW_CACHE_POLICY_FULL" => Some(Self::Full),
2336            "OVER_WINDOW_CACHE_POLICY_RECENT" => Some(Self::Recent),
2337            "OVER_WINDOW_CACHE_POLICY_RECENT_FIRST_N" => Some(Self::RecentFirstN),
2338            "OVER_WINDOW_CACHE_POLICY_RECENT_LAST_N" => Some(Self::RecentLastN),
2339            _ => None,
2340        }
2341    }
2342}
2343#[derive(prost_helpers::AnyPB)]
2344#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2345#[repr(i32)]
2346pub enum DispatcherType {
2347    Unspecified = 0,
2348    /// Dispatch by hash key, hashed by consistent hash.
2349    Hash = 1,
2350    /// Broadcast to all downstreams.
2351    ///
2352    /// Note a broadcast cannot be represented as multiple simple dispatchers, since they are
2353    /// different when we update dispatchers during scaling.
2354    Broadcast = 2,
2355    /// Only one downstream.
2356    Simple = 3,
2357    /// A special kind of exchange that doesn't involve shuffle. The upstream actor will be directly
2358    /// piped into the downstream actor, if there are the same number of actors. If number of actors
2359    /// are not the same, should use hash instead. Should be only used when distribution is the same.
2360    NoShuffle = 4,
2361}
2362impl DispatcherType {
2363    /// String value of the enum field names used in the ProtoBuf definition.
2364    ///
2365    /// The values are not transformed in any way and thus are considered stable
2366    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2367    pub fn as_str_name(&self) -> &'static str {
2368        match self {
2369            Self::Unspecified => "DISPATCHER_TYPE_UNSPECIFIED",
2370            Self::Hash => "DISPATCHER_TYPE_HASH",
2371            Self::Broadcast => "DISPATCHER_TYPE_BROADCAST",
2372            Self::Simple => "DISPATCHER_TYPE_SIMPLE",
2373            Self::NoShuffle => "DISPATCHER_TYPE_NO_SHUFFLE",
2374        }
2375    }
2376    /// Creates an enum from field names used in the ProtoBuf definition.
2377    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2378        match value {
2379            "DISPATCHER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2380            "DISPATCHER_TYPE_HASH" => Some(Self::Hash),
2381            "DISPATCHER_TYPE_BROADCAST" => Some(Self::Broadcast),
2382            "DISPATCHER_TYPE_SIMPLE" => Some(Self::Simple),
2383            "DISPATCHER_TYPE_NO_SHUFFLE" => Some(Self::NoShuffle),
2384            _ => None,
2385        }
2386    }
2387}