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