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