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