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