Skip to main content

risingwave_pb/
stream_plan.rs

1// This file is @generated by prost-build.
2#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Dispatchers {
5    #[prost(message, repeated, tag = "1")]
6    pub dispatchers: ::prost::alloc::vec::Vec<Dispatcher>,
7}
8#[derive(prost_helpers::AnyPB)]
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct UpstreamSinkInfo {
11    #[prost(uint32, tag = "1", wrapper = "crate::id::FragmentId")]
12    pub upstream_fragment_id: crate::id::FragmentId,
13    #[prost(message, repeated, tag = "2")]
14    pub sink_output_schema: ::prost::alloc::vec::Vec<super::plan_common::Field>,
15    #[prost(message, repeated, tag = "3")]
16    pub project_exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
17}
18#[derive(prost_helpers::AnyPB)]
19#[derive(Clone, PartialEq, ::prost::Message)]
20pub struct AddMutation {
21    /// New dispatchers for each actor.
22    #[prost(map = "uint32, message", tag = "1", wrapper = "crate::id::ActorId")]
23    pub actor_dispatchers: ::std::collections::HashMap<crate::id::ActorId, Dispatchers>,
24    /// All actors to be added (to the main connected component of the graph) in this update.
25    #[prost(uint32, repeated, tag = "3", wrapper = "crate::id::ActorId")]
26    pub added_actors: ::prost::alloc::vec::Vec<crate::id::ActorId>,
27    /// We may embed a source change split mutation here.
28    /// `Source` and `SourceBackfill` are handled together here.
29    /// TODO: we may allow multiple mutations in a single barrier.
30    #[prost(map = "uint32, message", tag = "2", wrapper = "crate::id::ActorId")]
31    pub actor_splits: ::std::collections::HashMap<
32        crate::id::ActorId,
33        super::source::ConnectorSplits,
34    >,
35    /// We may embed a pause mutation here.
36    /// TODO: we may allow multiple mutations in a single barrier.
37    #[prost(bool, tag = "4")]
38    pub pause: bool,
39    #[prost(message, repeated, tag = "5")]
40    pub subscriptions_to_add: ::prost::alloc::vec::Vec<SubscriptionUpstreamInfo>,
41    /// nodes which should be paused initially.
42    #[prost(uint32, repeated, tag = "6", wrapper = "crate::id::FragmentId")]
43    pub backfill_nodes_to_pause: ::prost::alloc::vec::Vec<crate::id::FragmentId>,
44    /// CDC table snapshot splits
45    #[prost(message, optional, tag = "7")]
46    pub actor_cdc_table_snapshot_splits: ::core::option::Option<
47        super::source::CdcTableSnapshotSplitsWithGeneration,
48    >,
49    /// Use downstream_fragment_id as keys.
50    #[prost(map = "uint32, message", tag = "8", wrapper = "crate::id::FragmentId")]
51    pub new_upstream_sinks: ::std::collections::HashMap<
52        crate::id::FragmentId,
53        add_mutation::NewUpstreamSink,
54    >,
55    /// All actors to be dropped while adding the new streaming job.
56    #[prost(uint32, repeated, tag = "9", wrapper = "crate::id::ActorId")]
57    pub dropped_actors: ::prost::alloc::vec::Vec<crate::id::ActorId>,
58    /// Sink ids whose log store must be drained before this add barrier can be collected.
59    #[prost(uint32, repeated, tag = "10", wrapper = "crate::id::SinkId")]
60    pub sink_log_store_flush: ::prost::alloc::vec::Vec<crate::id::SinkId>,
61}
62/// Nested message and enum types in `AddMutation`.
63pub mod add_mutation {
64    #[derive(prost_helpers::AnyPB)]
65    #[derive(Clone, PartialEq, ::prost::Message)]
66    pub struct NewUpstreamSink {
67        #[prost(message, optional, tag = "1")]
68        pub info: ::core::option::Option<super::UpstreamSinkInfo>,
69        #[prost(message, repeated, tag = "2")]
70        pub upstream_actors: ::prost::alloc::vec::Vec<super::super::common::ActorInfo>,
71    }
72}
73#[derive(prost_helpers::AnyPB)]
74#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
75pub struct StopMutation {
76    #[prost(uint32, repeated, tag = "1", wrapper = "crate::id::ActorId")]
77    pub actors: ::prost::alloc::vec::Vec<crate::id::ActorId>,
78    /// Only sink-fragment in the sink job is recorded.
79    #[prost(uint32, repeated, tag = "2", wrapper = "crate::id::FragmentId")]
80    pub dropped_sink_fragments: ::prost::alloc::vec::Vec<crate::id::FragmentId>,
81}
82#[derive(prost_helpers::AnyPB)]
83#[derive(Clone, PartialEq, ::prost::Message)]
84pub struct UpdateMutation {
85    /// Dispatcher updates.
86    #[prost(message, repeated, tag = "1")]
87    pub dispatcher_update: ::prost::alloc::vec::Vec<update_mutation::DispatcherUpdate>,
88    /// Merge updates.
89    #[prost(message, repeated, tag = "2")]
90    pub merge_update: ::prost::alloc::vec::Vec<update_mutation::MergeUpdate>,
91    /// Vnode bitmap updates for each actor.
92    #[prost(map = "uint32, message", tag = "3", wrapper = "crate::id::ActorId")]
93    pub actor_vnode_bitmap_update: ::std::collections::HashMap<
94        crate::id::ActorId,
95        super::common::Buffer,
96    >,
97    /// All actors to be dropped in this update.
98    #[prost(uint32, repeated, tag = "4", wrapper = "crate::id::ActorId")]
99    pub dropped_actors: ::prost::alloc::vec::Vec<crate::id::ActorId>,
100    /// Source updates.
101    /// `Source` and `SourceBackfill` are handled together here.
102    #[prost(map = "uint32, message", tag = "5", wrapper = "crate::id::ActorId")]
103    pub actor_splits: ::std::collections::HashMap<
104        crate::id::ActorId,
105        super::source::ConnectorSplits,
106    >,
107    /// When modifying the Materialized View, we need to recreate the Dispatcher from the old upstream to the new TableFragment.
108    /// Consistent with the semantics in AddMutation.
109    #[prost(map = "uint32, message", tag = "6", wrapper = "crate::id::ActorId")]
110    pub actor_new_dispatchers: ::std::collections::HashMap<
111        crate::id::ActorId,
112        Dispatchers,
113    >,
114    /// CDC table snapshot splits
115    #[prost(message, optional, tag = "7")]
116    pub actor_cdc_table_snapshot_splits: ::core::option::Option<
117        super::source::CdcTableSnapshotSplitsWithGeneration,
118    >,
119    #[prost(map = "uint32, message", tag = "8")]
120    pub sink_schema_change: ::std::collections::HashMap<u32, SinkSchemaChange>,
121    #[prost(message, repeated, tag = "9")]
122    pub subscriptions_to_drop: ::prost::alloc::vec::Vec<SubscriptionUpstreamInfo>,
123}
124/// Nested message and enum types in `UpdateMutation`.
125pub mod update_mutation {
126    #[derive(prost_helpers::AnyPB)]
127    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
128    pub struct DispatcherUpdate {
129        /// Dispatcher can be uniquely identified by a combination of actor id and dispatcher id.
130        #[prost(uint32, tag = "1", wrapper = "crate::id::ActorId")]
131        pub actor_id: crate::id::ActorId,
132        #[prost(uint32, tag = "2", wrapper = "crate::id::FragmentId")]
133        pub dispatcher_id: crate::id::FragmentId,
134        /// The hash mapping for consistent hash.
135        /// For dispatcher types other than HASH, this is ignored.
136        #[prost(message, optional, tag = "3")]
137        pub hash_mapping: ::core::option::Option<super::ActorMapping>,
138        /// Added downstream actors.
139        #[prost(uint32, repeated, tag = "4", wrapper = "crate::id::ActorId")]
140        pub added_downstream_actor_id: ::prost::alloc::vec::Vec<crate::id::ActorId>,
141        /// Removed downstream actors.
142        #[prost(uint32, repeated, tag = "5", wrapper = "crate::id::ActorId")]
143        pub removed_downstream_actor_id: ::prost::alloc::vec::Vec<crate::id::ActorId>,
144    }
145    #[derive(prost_helpers::AnyPB)]
146    #[derive(Clone, PartialEq, ::prost::Message)]
147    pub struct MergeUpdate {
148        /// Merge executor can be uniquely identified by a combination of actor id and upstream fragment id.
149        #[prost(uint32, tag = "1", wrapper = "crate::id::ActorId")]
150        pub actor_id: crate::id::ActorId,
151        #[prost(uint32, tag = "2", wrapper = "crate::id::FragmentId")]
152        pub upstream_fragment_id: crate::id::FragmentId,
153        /// * For scaling, this is always `None`.
154        /// * For plan change, the upstream fragment will be changed to a new one, and this will be `Some`.
155        ///   In this case, all the upstream actors should be removed and replaced by the `new` ones.
156        #[prost(uint32, optional, tag = "5", wrapper = "crate::id::FragmentId")]
157        pub new_upstream_fragment_id: ::core::option::Option<crate::id::FragmentId>,
158        /// Added upstream actors.
159        #[prost(message, repeated, tag = "3")]
160        pub added_upstream_actors: ::prost::alloc::vec::Vec<
161            super::super::common::ActorInfo,
162        >,
163        /// Removed upstream actors.
164        /// Note: this is empty for replace job.
165        #[prost(uint32, repeated, tag = "4", wrapper = "crate::id::ActorId")]
166        pub removed_upstream_actor_id: ::prost::alloc::vec::Vec<crate::id::ActorId>,
167    }
168}
169#[derive(prost_helpers::AnyPB)]
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct SourceChangeSplitMutation {
172    /// `Source` and `SourceBackfill` are handled together here.
173    #[prost(map = "uint32, message", tag = "2", wrapper = "crate::id::ActorId")]
174    pub actor_splits: ::std::collections::HashMap<
175        crate::id::ActorId,
176        super::source::ConnectorSplits,
177    >,
178}
179#[derive(prost_helpers::AnyPB)]
180#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
181pub struct PauseMutation {}
182#[derive(prost_helpers::AnyPB)]
183#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
184pub struct ResumeMutation {}
185#[derive(prost_helpers::AnyPB)]
186#[derive(Clone, PartialEq, ::prost::Message)]
187pub struct ThrottleMutation {
188    #[prost(map = "uint32, message", tag = "1", wrapper = "crate::id::FragmentId")]
189    pub fragment_throttle: ::std::collections::HashMap<
190        crate::id::FragmentId,
191        throttle_mutation::ThrottleConfig,
192    >,
193}
194/// Nested message and enum types in `ThrottleMutation`.
195pub mod throttle_mutation {
196    #[derive(prost_helpers::AnyPB)]
197    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
198    pub struct ThrottleConfig {
199        #[prost(uint32, optional, tag = "1")]
200        pub rate_limit: ::core::option::Option<u32>,
201        #[prost(enumeration = "super::super::common::ThrottleType", tag = "2")]
202        pub throttle_type: i32,
203    }
204}
205#[derive(prost_helpers::AnyPB)]
206#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
207pub struct SubscriptionUpstreamInfo {
208    /// can either be subscription_id or table_id of creating TableFragments
209    #[prost(uint32, tag = "1", wrapper = "crate::id::SubscriberId")]
210    pub subscriber_id: crate::id::SubscriberId,
211    #[prost(uint32, tag = "2", wrapper = "crate::id::TableId")]
212    pub upstream_mv_table_id: crate::id::TableId,
213}
214#[derive(prost_helpers::AnyPB)]
215#[derive(Clone, PartialEq, ::prost::Message)]
216pub struct DropSubscriptionsMutation {
217    #[prost(message, repeated, tag = "1")]
218    pub info: ::prost::alloc::vec::Vec<SubscriptionUpstreamInfo>,
219}
220#[derive(prost_helpers::AnyPB)]
221#[derive(Clone, PartialEq, ::prost::Message)]
222pub struct ConnectorPropsChangeMutation {
223    #[prost(map = "uint32, message", tag = "1")]
224    pub connector_props_infos: ::std::collections::HashMap<
225        u32,
226        connector_props_change_mutation::ConnectorPropsInfo,
227    >,
228}
229/// Nested message and enum types in `ConnectorPropsChangeMutation`.
230pub mod connector_props_change_mutation {
231    #[derive(prost_helpers::AnyPB)]
232    #[derive(Clone, PartialEq, ::prost::Message)]
233    pub struct ConnectorPropsInfo {
234        #[prost(map = "string, string", tag = "1")]
235        pub connector_props_info: ::std::collections::HashMap<
236            ::prost::alloc::string::String,
237            ::prost::alloc::string::String,
238        >,
239    }
240}
241#[derive(prost_helpers::AnyPB)]
242#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
243pub struct StartFragmentBackfillMutation {
244    #[prost(uint32, repeated, tag = "1", wrapper = "crate::id::FragmentId")]
245    pub fragment_ids: ::prost::alloc::vec::Vec<crate::id::FragmentId>,
246}
247#[derive(prost_helpers::AnyPB)]
248#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
249pub struct RefreshStartMutation {
250    /// Table ID to start refresh operation.
251    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
252    pub table_id: crate::id::TableId,
253    /// Associated source ID for this refresh operation.
254    #[prost(uint32, tag = "2", wrapper = "crate::id::SourceId")]
255    pub associated_source_id: crate::id::SourceId,
256}
257#[derive(prost_helpers::AnyPB)]
258#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
259pub struct ListFinishMutation {
260    /// Associated source ID for this list operation.
261    #[prost(uint32, tag = "1", wrapper = "crate::id::SourceId")]
262    pub associated_source_id: crate::id::SourceId,
263}
264#[derive(prost_helpers::AnyPB)]
265#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
266pub struct LoadFinishMutation {
267    /// Associated source ID for this load operation.
268    #[prost(uint32, tag = "1", wrapper = "crate::id::SourceId")]
269    pub associated_source_id: crate::id::SourceId,
270}
271#[derive(prost_helpers::AnyPB)]
272#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
273pub struct ResetSourceMutation {
274    /// Source ID to reset
275    #[prost(uint32, tag = "1")]
276    pub source_id: u32,
277}
278/// Inject specific offsets into source splits (UNSAFE - admin only).
279/// This overwrites the stored offsets and can cause data duplication or loss.
280#[derive(prost_helpers::AnyPB)]
281#[derive(Clone, PartialEq, ::prost::Message)]
282pub struct InjectSourceOffsetsMutation {
283    /// Source ID to inject offsets for
284    #[prost(uint32, tag = "1")]
285    pub source_id: u32,
286    /// Split ID -> offset (JSON-encoded based on connector type)
287    #[prost(map = "string, string", tag = "2")]
288    pub split_offsets: ::std::collections::HashMap<
289        ::prost::alloc::string::String,
290        ::prost::alloc::string::String,
291    >,
292}
293/// Context for an ongoing iceberg pk-index compaction.
294#[derive(prost_helpers::AnyPB)]
295#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
296pub struct IcebergPkIndexCompactionContext {
297    #[prost(uint32, tag = "1", wrapper = "crate::id::SinkId")]
298    pub sink_id: crate::id::SinkId,
299    #[prost(uint64, tag = "2", wrapper = "crate::id::IcebergCompactionTaskId")]
300    pub task_id: crate::id::IcebergCompactionTaskId,
301    #[prost(enumeration = "iceberg_pk_index_compaction_context::Phase", tag = "3")]
302    pub phase: i32,
303}
304/// Nested message and enum types in `IcebergPkIndexCompactionContext`.
305pub mod iceberg_pk_index_compaction_context {
306    #[derive(prost_helpers::AnyPB)]
307    #[derive(
308        Clone,
309        Copy,
310        Debug,
311        PartialEq,
312        Eq,
313        Hash,
314        PartialOrd,
315        Ord,
316        ::prost::Enumeration
317    )]
318    #[repr(i32)]
319    pub enum Phase {
320        Unspecified = 0,
321        Begin = 1,
322        End = 2,
323    }
324    impl Phase {
325        /// String value of the enum field names used in the ProtoBuf definition.
326        ///
327        /// The values are not transformed in any way and thus are considered stable
328        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
329        pub fn as_str_name(&self) -> &'static str {
330            match self {
331                Self::Unspecified => "PHASE_UNSPECIFIED",
332                Self::Begin => "PHASE_BEGIN",
333                Self::End => "PHASE_END",
334            }
335        }
336        /// Creates an enum from field names used in the ProtoBuf definition.
337        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
338            match value {
339                "PHASE_UNSPECIFIED" => Some(Self::Unspecified),
340                "PHASE_BEGIN" => Some(Self::Begin),
341                "PHASE_END" => Some(Self::End),
342                _ => None,
343            }
344        }
345    }
346}
347#[derive(prost_helpers::AnyPB)]
348#[derive(Clone, PartialEq, ::prost::Message)]
349pub struct BarrierMutation {
350    #[prost(
351        oneof = "barrier_mutation::Mutation",
352        tags = "3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19"
353    )]
354    pub mutation: ::core::option::Option<barrier_mutation::Mutation>,
355}
356/// Nested message and enum types in `BarrierMutation`.
357pub mod barrier_mutation {
358    #[derive(prost_helpers::AnyPB)]
359    #[derive(Clone, PartialEq, ::prost::Oneof)]
360    pub enum Mutation {
361        /// Add new dispatchers to some actors, used for creating materialized views.
362        #[prost(message, tag = "3")]
363        Add(super::AddMutation),
364        /// Stop a set of actors, used for dropping materialized views. Empty dispatchers will be
365        /// automatically removed.
366        #[prost(message, tag = "4")]
367        Stop(super::StopMutation),
368        /// Update outputs and hash mappings for some dispatchers, used for scaling and replace table.
369        #[prost(message, tag = "5")]
370        Update(super::UpdateMutation),
371        /// Change the split of some sources.
372        #[prost(message, tag = "6")]
373        Splits(super::SourceChangeSplitMutation),
374        /// Pause the dataflow of the whole streaming graph, only used for scaling.
375        #[prost(message, tag = "7")]
376        Pause(super::PauseMutation),
377        /// Resume the dataflow of the whole streaming graph, only used for scaling.
378        #[prost(message, tag = "8")]
379        Resume(super::ResumeMutation),
380        /// Alter the RateLimit of some specific executors
381        #[prost(message, tag = "10")]
382        Throttle(super::ThrottleMutation),
383        /// Drop subscription on mv
384        #[prost(message, tag = "12")]
385        DropSubscriptions(super::DropSubscriptionsMutation),
386        /// Alter sink/connector/source props
387        #[prost(message, tag = "13")]
388        ConnectorPropsChange(super::ConnectorPropsChangeMutation),
389        /// Start backfilling for specific fragments
390        /// This is separated from `ThrottleMutation::NO_RATE_LIMIT`.
391        /// This is because user may concurrently rate limit + use backfill order control.
392        /// If we use rate limit to pause / resume backfill fragments, if user manually
393        /// resumes some fragments, this will overwrite the backfill order configuration.
394        #[prost(message, tag = "14")]
395        StartFragmentBackfill(super::StartFragmentBackfillMutation),
396        /// Start refresh signal for refreshing tables
397        #[prost(message, tag = "15")]
398        RefreshStart(super::RefreshStartMutation),
399        /// Load finish signal for refreshing tables
400        #[prost(message, tag = "16")]
401        LoadFinish(super::LoadFinishMutation),
402        /// List finish signal for refreshing tables
403        #[prost(message, tag = "17")]
404        ListFinish(super::ListFinishMutation),
405        /// Reset CDC source offset to latest
406        #[prost(message, tag = "18")]
407        ResetSource(super::ResetSourceMutation),
408        /// Inject specific offsets into source splits (UNSAFE)
409        #[prost(message, tag = "19")]
410        InjectSourceOffsets(super::InjectSourceOffsetsMutation),
411    }
412}
413#[derive(prost_helpers::AnyPB)]
414#[derive(Clone, PartialEq, ::prost::Message)]
415pub struct Barrier {
416    #[prost(message, optional, tag = "1")]
417    pub epoch: ::core::option::Option<super::data::Epoch>,
418    #[prost(message, optional, tag = "3")]
419    pub mutation: ::core::option::Option<BarrierMutation>,
420    /// Used for tracing.
421    #[prost(map = "string, string", tag = "2")]
422    pub tracing_context: ::std::collections::HashMap<
423        ::prost::alloc::string::String,
424        ::prost::alloc::string::String,
425    >,
426    /// The kind of the barrier.
427    #[prost(enumeration = "barrier::BarrierKind", tag = "9")]
428    pub kind: i32,
429    #[prost(message, optional, tag = "10")]
430    pub iceberg_pk_index_compaction: ::core::option::Option<
431        IcebergPkIndexCompactionContext,
432    >,
433}
434/// Nested message and enum types in `Barrier`.
435pub mod barrier {
436    #[derive(prost_helpers::AnyPB)]
437    #[derive(::enum_as_inner::EnumAsInner)]
438    #[derive(
439        Clone,
440        Copy,
441        Debug,
442        PartialEq,
443        Eq,
444        Hash,
445        PartialOrd,
446        Ord,
447        ::prost::Enumeration
448    )]
449    #[repr(i32)]
450    pub enum BarrierKind {
451        Unspecified = 0,
452        /// The first barrier after a fresh start or recovery.
453        /// There will be no data associated with the previous epoch of the barrier.
454        Initial = 1,
455        /// A normal barrier. Data should be flushed locally.
456        Barrier = 2,
457        /// A checkpoint barrier. Data should be synchorized to the shared storage.
458        Checkpoint = 3,
459    }
460    impl BarrierKind {
461        /// String value of the enum field names used in the ProtoBuf definition.
462        ///
463        /// The values are not transformed in any way and thus are considered stable
464        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
465        pub fn as_str_name(&self) -> &'static str {
466            match self {
467                Self::Unspecified => "BARRIER_KIND_UNSPECIFIED",
468                Self::Initial => "BARRIER_KIND_INITIAL",
469                Self::Barrier => "BARRIER_KIND_BARRIER",
470                Self::Checkpoint => "BARRIER_KIND_CHECKPOINT",
471            }
472        }
473        /// Creates an enum from field names used in the ProtoBuf definition.
474        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
475            match value {
476                "BARRIER_KIND_UNSPECIFIED" => Some(Self::Unspecified),
477                "BARRIER_KIND_INITIAL" => Some(Self::Initial),
478                "BARRIER_KIND_BARRIER" => Some(Self::Barrier),
479                "BARRIER_KIND_CHECKPOINT" => Some(Self::Checkpoint),
480                _ => None,
481            }
482        }
483    }
484}
485#[derive(prost_helpers::AnyPB)]
486#[derive(Clone, PartialEq, ::prost::Message)]
487pub struct Watermark {
488    /// The reference to the watermark column in the stream's schema.
489    #[prost(message, optional, tag = "1")]
490    pub column: ::core::option::Option<super::expr::InputRef>,
491    /// The watermark value, there will be no record having a greater value in the watermark column.
492    #[prost(message, optional, tag = "3")]
493    pub val: ::core::option::Option<super::data::Datum>,
494}
495#[derive(prost_helpers::AnyPB)]
496#[derive(Clone, PartialEq, ::prost::Message)]
497pub struct StreamMessage {
498    #[prost(oneof = "stream_message::StreamMessage", tags = "1, 2, 3")]
499    pub stream_message: ::core::option::Option<stream_message::StreamMessage>,
500}
501/// Nested message and enum types in `StreamMessage`.
502pub mod stream_message {
503    #[derive(prost_helpers::AnyPB)]
504    #[derive(Clone, PartialEq, ::prost::Oneof)]
505    pub enum StreamMessage {
506        #[prost(message, tag = "1")]
507        StreamChunk(super::super::data::StreamChunk),
508        #[prost(message, tag = "2")]
509        Barrier(super::Barrier),
510        #[prost(message, tag = "3")]
511        Watermark(super::Watermark),
512    }
513}
514#[derive(prost_helpers::AnyPB)]
515#[derive(Clone, PartialEq, ::prost::Message)]
516pub struct StreamMessageBatch {
517    #[prost(oneof = "stream_message_batch::StreamMessageBatch", tags = "1, 2, 3")]
518    pub stream_message_batch: ::core::option::Option<
519        stream_message_batch::StreamMessageBatch,
520    >,
521}
522/// Nested message and enum types in `StreamMessageBatch`.
523pub mod stream_message_batch {
524    #[derive(prost_helpers::AnyPB)]
525    #[derive(Clone, PartialEq, ::prost::Message)]
526    pub struct BarrierBatch {
527        #[prost(message, repeated, tag = "1")]
528        pub barriers: ::prost::alloc::vec::Vec<super::Barrier>,
529    }
530    #[derive(prost_helpers::AnyPB)]
531    #[derive(Clone, PartialEq, ::prost::Oneof)]
532    pub enum StreamMessageBatch {
533        #[prost(message, tag = "1")]
534        StreamChunk(super::super::data::StreamChunk),
535        #[prost(message, tag = "2")]
536        BarrierBatch(BarrierBatch),
537        #[prost(message, tag = "3")]
538        Watermark(super::Watermark),
539    }
540}
541/// Hash mapping for compute node. Stores mapping from virtual node to actor id.
542#[derive(prost_helpers::AnyPB)]
543#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
544pub struct ActorMapping {
545    #[prost(uint32, repeated, tag = "1")]
546    pub original_indices: ::prost::alloc::vec::Vec<u32>,
547    #[prost(uint32, repeated, tag = "2", wrapper = "crate::id::ActorId")]
548    pub data: ::prost::alloc::vec::Vec<crate::id::ActorId>,
549}
550#[derive(prost_helpers::AnyPB)]
551#[derive(Clone, PartialEq, ::prost::Message)]
552pub struct Columns {
553    #[prost(message, repeated, tag = "1")]
554    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
555}
556#[derive(prost_helpers::AnyPB)]
557#[derive(Clone, PartialEq, ::prost::Message)]
558pub struct StreamSource {
559    #[prost(uint32, tag = "1", wrapper = "crate::id::SourceId")]
560    pub source_id: crate::id::SourceId,
561    #[prost(message, optional, tag = "2")]
562    pub state_table: ::core::option::Option<super::catalog::Table>,
563    #[prost(uint32, optional, tag = "3")]
564    pub row_id_index: ::core::option::Option<u32>,
565    #[prost(message, repeated, tag = "4")]
566    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
567    #[prost(btree_map = "string, string", tag = "6")]
568    pub with_properties: ::prost::alloc::collections::BTreeMap<
569        ::prost::alloc::string::String,
570        ::prost::alloc::string::String,
571    >,
572    #[prost(message, optional, tag = "7")]
573    pub info: ::core::option::Option<super::catalog::StreamSourceInfo>,
574    #[prost(string, tag = "8")]
575    pub source_name: ::prost::alloc::string::String,
576    /// Source rate limit
577    #[prost(uint32, optional, tag = "9")]
578    pub rate_limit: ::core::option::Option<u32>,
579    #[prost(btree_map = "string, message", tag = "10")]
580    pub secret_refs: ::prost::alloc::collections::BTreeMap<
581        ::prost::alloc::string::String,
582        super::secret::SecretRef,
583    >,
584    /// Downstream columns are used by list node to know which columns are needed.
585    #[prost(message, optional, tag = "11")]
586    pub downstream_columns: ::core::option::Option<Columns>,
587    #[prost(message, optional, tag = "12")]
588    pub refresh_mode: ::core::option::Option<super::plan_common::SourceRefreshMode>,
589    #[prost(uint32, optional, tag = "13", wrapper = "crate::id::TableId")]
590    pub associated_table_id: ::core::option::Option<crate::id::TableId>,
591}
592/// copy contents from StreamSource to prevent compatibility issues in the future
593#[derive(prost_helpers::AnyPB)]
594#[derive(Clone, PartialEq, ::prost::Message)]
595pub struct StreamFsFetch {
596    #[prost(uint32, tag = "1", wrapper = "crate::id::SourceId")]
597    pub source_id: crate::id::SourceId,
598    #[prost(message, optional, tag = "2")]
599    pub state_table: ::core::option::Option<super::catalog::Table>,
600    #[prost(uint32, optional, tag = "3")]
601    pub row_id_index: ::core::option::Option<u32>,
602    #[prost(message, repeated, tag = "4")]
603    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
604    #[prost(btree_map = "string, string", tag = "6")]
605    pub with_properties: ::prost::alloc::collections::BTreeMap<
606        ::prost::alloc::string::String,
607        ::prost::alloc::string::String,
608    >,
609    #[prost(message, optional, tag = "7")]
610    pub info: ::core::option::Option<super::catalog::StreamSourceInfo>,
611    #[prost(string, tag = "8")]
612    pub source_name: ::prost::alloc::string::String,
613    /// Source rate limit
614    #[prost(uint32, optional, tag = "9")]
615    pub rate_limit: ::core::option::Option<u32>,
616    #[prost(btree_map = "string, message", tag = "10")]
617    pub secret_refs: ::prost::alloc::collections::BTreeMap<
618        ::prost::alloc::string::String,
619        super::secret::SecretRef,
620    >,
621    #[prost(message, optional, tag = "11")]
622    pub refresh_mode: ::core::option::Option<super::plan_common::SourceRefreshMode>,
623    #[prost(uint32, optional, tag = "12", wrapper = "crate::id::TableId")]
624    pub associated_table_id: ::core::option::Option<crate::id::TableId>,
625}
626/// The executor only for receiving barrier from the meta service. It always resides in the leaves
627/// of the streaming graph.
628#[derive(prost_helpers::AnyPB)]
629#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
630pub struct BarrierRecvNode {}
631#[derive(prost_helpers::AnyPB)]
632#[derive(Clone, PartialEq, ::prost::Message)]
633pub struct SourceNode {
634    /// The source node can contain either a stream source or nothing. So here we extract all
635    /// information about stream source to a message, and here it will be an `Option` in Rust.
636    #[prost(message, optional, tag = "1")]
637    pub source_inner: ::core::option::Option<StreamSource>,
638}
639#[derive(prost_helpers::AnyPB)]
640#[derive(Clone, PartialEq, ::prost::Message)]
641pub struct StreamFsFetchNode {
642    #[prost(message, optional, tag = "1")]
643    pub node_inner: ::core::option::Option<StreamFsFetch>,
644}
645/// / It's input must be a `MergeNode`, which connects to the upstream source job.
646/// / See `StreamSourceScan::adhoc_to_stream_prost` for the plan.
647#[derive(prost_helpers::AnyPB)]
648#[derive(Clone, PartialEq, ::prost::Message)]
649pub struct SourceBackfillNode {
650    #[prost(uint32, tag = "1", wrapper = "crate::id::SourceId")]
651    pub upstream_source_id: crate::id::SourceId,
652    #[prost(uint32, optional, tag = "2")]
653    pub row_id_index: ::core::option::Option<u32>,
654    #[prost(message, repeated, tag = "3")]
655    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
656    #[prost(message, optional, tag = "4")]
657    pub info: ::core::option::Option<super::catalog::StreamSourceInfo>,
658    #[prost(string, tag = "5")]
659    pub source_name: ::prost::alloc::string::String,
660    #[prost(btree_map = "string, string", tag = "6")]
661    pub with_properties: ::prost::alloc::collections::BTreeMap<
662        ::prost::alloc::string::String,
663        ::prost::alloc::string::String,
664    >,
665    /// Backfill rate limit
666    #[prost(uint32, optional, tag = "7")]
667    pub rate_limit: ::core::option::Option<u32>,
668    /// `| partition_id | backfill_progress |`
669    #[prost(message, optional, tag = "8")]
670    pub state_table: ::core::option::Option<super::catalog::Table>,
671    #[prost(btree_map = "string, message", tag = "9")]
672    pub secret_refs: ::prost::alloc::collections::BTreeMap<
673        ::prost::alloc::string::String,
674        super::secret::SecretRef,
675    >,
676}
677#[derive(prost_helpers::AnyPB)]
678#[derive(Clone, PartialEq, ::prost::Message)]
679pub struct SinkDesc {
680    #[prost(uint32, tag = "1", wrapper = "crate::id::SinkId")]
681    pub id: crate::id::SinkId,
682    #[prost(string, tag = "2")]
683    pub name: ::prost::alloc::string::String,
684    #[prost(string, tag = "3")]
685    pub definition: ::prost::alloc::string::String,
686    #[prost(message, repeated, tag = "5")]
687    pub plan_pk: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
688    #[prost(uint32, repeated, tag = "6")]
689    pub downstream_pk: ::prost::alloc::vec::Vec<u32>,
690    #[prost(uint32, repeated, tag = "7")]
691    pub distribution_key: ::prost::alloc::vec::Vec<u32>,
692    #[prost(btree_map = "string, string", tag = "8")]
693    pub properties: ::prost::alloc::collections::BTreeMap<
694        ::prost::alloc::string::String,
695        ::prost::alloc::string::String,
696    >,
697    /// to be deprecated
698    #[prost(enumeration = "super::catalog::SinkType", tag = "9")]
699    pub sink_type: i32,
700    #[prost(message, repeated, tag = "10")]
701    pub column_catalogs: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
702    #[prost(string, tag = "11")]
703    pub db_name: ::prost::alloc::string::String,
704    /// If the sink is from table or mv, this is name of the table/mv. Otherwise
705    /// it is the name of the sink itself.
706    #[prost(string, tag = "12")]
707    pub sink_from_name: ::prost::alloc::string::String,
708    #[prost(message, optional, tag = "13")]
709    pub format_desc: ::core::option::Option<super::catalog::SinkFormatDesc>,
710    #[prost(uint32, optional, tag = "14")]
711    pub target_table: ::core::option::Option<u32>,
712    #[prost(uint64, optional, tag = "15")]
713    pub extra_partition_col_idx: ::core::option::Option<u64>,
714    #[prost(btree_map = "string, message", tag = "16")]
715    pub secret_refs: ::prost::alloc::collections::BTreeMap<
716        ::prost::alloc::string::String,
717        super::secret::SecretRef,
718    >,
719    /// Backward-compatible replacement for `SINK_TYPE_FORCE_APPEND_ONLY`.
720    ///
721    /// Should not directly access this field. Use method `ignore_delete()` instead.
722    #[prost(bool, tag = "17")]
723    pub raw_ignore_delete: bool,
724}
725#[derive(prost_helpers::AnyPB)]
726#[derive(Clone, PartialEq, ::prost::Message)]
727pub struct SinkNode {
728    #[prost(message, optional, tag = "1")]
729    pub sink_desc: ::core::option::Option<SinkDesc>,
730    /// A sink with a kv log store should have a table.
731    #[prost(message, optional, tag = "2")]
732    pub table: ::core::option::Option<super::catalog::Table>,
733    #[prost(enumeration = "SinkLogStoreType", tag = "3")]
734    pub log_store_type: i32,
735    #[prost(uint32, optional, tag = "4")]
736    pub rate_limit: ::core::option::Option<u32>,
737}
738#[derive(prost_helpers::AnyPB)]
739#[derive(Clone, PartialEq, ::prost::Message)]
740pub struct IcebergWithPkIndexWriterNode {
741    #[prost(message, optional, tag = "1")]
742    pub sink_desc: ::core::option::Option<SinkDesc>,
743    #[prost(message, optional, tag = "2")]
744    pub pk_index_table: ::core::option::Option<super::catalog::Table>,
745}
746#[derive(prost_helpers::AnyPB)]
747#[derive(Clone, PartialEq, ::prost::Message)]
748pub struct IcebergWithPkIndexPositionDeleteMergerNode {
749    #[prost(message, optional, tag = "1")]
750    pub sink_desc: ::core::option::Option<SinkDesc>,
751}
752/// Leaf of a transient pk-index compaction pipeline
753#[derive(prost_helpers::AnyPB)]
754#[derive(Clone, PartialEq, ::prost::Message)]
755pub struct CompactionResolverNode {
756    #[prost(message, optional, tag = "1")]
757    pub sink_desc: ::core::option::Option<SinkDesc>,
758    #[prost(message, optional, tag = "2")]
759    pub pk_index_table: ::core::option::Option<super::catalog::Table>,
760    #[prost(string, repeated, tag = "3")]
761    pub output_data_file_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
762    #[prost(string, repeated, tag = "4")]
763    pub input_data_file_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
764    #[prost(int64, tag = "5")]
765    pub read_snapshot_id: i64,
766    #[prost(uint64, tag = "6", wrapper = "crate::id::IcebergCompactionTaskId")]
767    pub compaction_task_id: crate::id::IcebergCompactionTaskId,
768}
769#[derive(prost_helpers::AnyPB)]
770#[derive(Clone, PartialEq, ::prost::Message)]
771pub struct ProjectNode {
772    #[prost(message, repeated, tag = "1")]
773    pub select_list: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
774    /// this two field is expressing a list of usize pair, which means when project receives a
775    /// watermark with `watermark_input_cols\[i\]` column index, it should derive a new watermark
776    /// with `watermark_output_cols\[i\]`th expression
777    #[prost(uint32, repeated, tag = "2")]
778    pub watermark_input_cols: ::prost::alloc::vec::Vec<u32>,
779    #[prost(uint32, repeated, tag = "3")]
780    pub watermark_output_cols: ::prost::alloc::vec::Vec<u32>,
781    #[prost(uint32, repeated, tag = "4")]
782    pub nondecreasing_exprs: ::prost::alloc::vec::Vec<u32>,
783    /// Whether there are likely no-op updates in the output chunks, so that eliminating them with
784    /// `StreamChunk::eliminate_adjacent_noop_update` could be beneficial.
785    #[prost(bool, tag = "5")]
786    pub noop_update_hint: bool,
787}
788#[derive(prost_helpers::AnyPB)]
789#[derive(Clone, PartialEq, ::prost::Message)]
790pub struct FilterNode {
791    #[prost(message, optional, tag = "1")]
792    pub search_condition: ::core::option::Option<super::expr::ExprNode>,
793}
794#[derive(prost_helpers::AnyPB)]
795#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
796pub struct ChangeLogNode {
797    /// Whether or not there is an op in the final output.
798    #[prost(bool, tag = "1")]
799    pub need_op: bool,
800    #[prost(uint32, repeated, tag = "2")]
801    pub distribution_keys: ::prost::alloc::vec::Vec<u32>,
802}
803#[derive(prost_helpers::AnyPB)]
804#[derive(Clone, PartialEq, ::prost::Message)]
805pub struct CdcFilterNode {
806    #[prost(message, optional, tag = "1")]
807    pub search_condition: ::core::option::Option<super::expr::ExprNode>,
808    #[prost(uint32, tag = "2", wrapper = "crate::id::SourceId")]
809    pub upstream_source_id: crate::id::SourceId,
810}
811/// A materialized view is regarded as a table.
812/// In addition, we also specify primary key to MV for efficient point lookup during update and deletion.
813///
814/// The node will be used for both create mv and create index.
815///
816/// * When creating mv, `pk == distribution_key == column_orders`.
817/// * When creating index, `column_orders` will contain both
818///   arrange columns and pk columns, while distribution key will be arrange columns.
819#[derive(prost_helpers::AnyPB)]
820#[derive(Clone, PartialEq, ::prost::Message)]
821pub struct MaterializeNode {
822    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
823    pub table_id: crate::id::TableId,
824    /// Column indexes and orders of primary key.
825    #[prost(message, repeated, tag = "2")]
826    pub column_orders: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
827    /// Primary materialized table that stores the final result data.
828    /// Purpose: This is the main table that users query against. It contains the
829    /// complete materialized view results with all columns from the SELECT clause.
830    /// Schema: Matches the output schema of the materialized view query
831    /// PK: Determined by the stream key of the materialized view
832    /// Distribution: Hash distributed by primary key columns for parallel processing
833    #[prost(message, optional, tag = "3")]
834    pub table: ::core::option::Option<super::catalog::Table>,
835    /// Staging table for refreshable materialized views during refresh operations.
836    /// Purpose: Temporary storage for collecting new/updated data during refresh.
837    /// This allows atomic replacement of old data with refreshed data.
838    /// Schema: Contains only the primary key columns from the main table (pk-only table)
839    /// - All PK columns with same data types as main table
840    /// - Same primary key definition as main table
841    /// Usage: Active only during refresh operations, empty otherwise
842    /// Lifecycle: Created -> populated during refresh -> merged with main table -> cleared
843    #[prost(message, optional, tag = "5")]
844    pub staging_table: ::core::option::Option<super::catalog::Table>,
845    /// Progress tracking table for refreshable materialized views.
846    /// Purpose: Tracks refresh operation progress per VirtualNode to enable fault-tolerant
847    /// resumable refresh operations. Stores checkpoint information for recovery.
848    /// Schema: Simplified variable-length schema (following backfill pattern):
849    /// - vnode (i32): VirtualNode identifier (PK)
850    /// - current_pos...: Current processing position (variable PK fields from upstream)
851    /// - is_completed (bool): Whether this vnode has completed processing
852    /// - processed_rows (i64): Number of rows processed so far in this vnode
853    /// PK: vnode (allows efficient per-vnode progress lookup and updates)
854    /// Distribution: Hash distributed by vnode for parallel progress tracking
855    /// Usage: Persists across refresh operations for resumability
856    /// Note: Stage info is now tracked in MaterializeExecutor memory for simplicity
857    #[prost(message, optional, tag = "6")]
858    pub refresh_progress_table: ::core::option::Option<super::catalog::Table>,
859    /// Whether the table can clean itself by TTL watermark, i.e., is defined with `WATERMARK ... WITH TTL`.
860    #[prost(bool, tag = "7")]
861    pub cleaned_by_ttl_watermark: bool,
862}
863#[derive(prost_helpers::AnyPB)]
864#[derive(Clone, PartialEq, ::prost::Message)]
865pub struct AggCallState {
866    #[prost(oneof = "agg_call_state::Inner", tags = "1, 3")]
867    pub inner: ::core::option::Option<agg_call_state::Inner>,
868}
869/// Nested message and enum types in `AggCallState`.
870pub mod agg_call_state {
871    /// the state is stored in the intermediate state table. used for count/sum/append-only extreme.
872    #[derive(prost_helpers::AnyPB)]
873    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
874    pub struct ValueState {}
875    /// use the some column of the Upstream's materialization as the AggCall's state, used for extreme/string_agg/array_agg.
876    #[derive(prost_helpers::AnyPB)]
877    #[derive(Clone, PartialEq, ::prost::Message)]
878    pub struct MaterializedInputState {
879        #[prost(message, optional, tag = "1")]
880        pub table: ::core::option::Option<super::super::catalog::Table>,
881        /// for constructing state table column mapping
882        #[prost(uint32, repeated, tag = "2")]
883        pub included_upstream_indices: ::prost::alloc::vec::Vec<u32>,
884        #[prost(uint32, repeated, tag = "3")]
885        pub table_value_indices: ::prost::alloc::vec::Vec<u32>,
886        #[prost(message, repeated, tag = "4")]
887        pub order_columns: ::prost::alloc::vec::Vec<super::super::common::ColumnOrder>,
888    }
889    #[derive(prost_helpers::AnyPB)]
890    #[derive(Clone, PartialEq, ::prost::Oneof)]
891    pub enum Inner {
892        #[prost(message, tag = "1")]
893        ValueState(ValueState),
894        #[prost(message, tag = "3")]
895        MaterializedInputState(MaterializedInputState),
896    }
897}
898#[derive(prost_helpers::AnyPB)]
899#[derive(Clone, PartialEq, ::prost::Message)]
900pub struct SimpleAggNode {
901    #[prost(message, repeated, tag = "1")]
902    pub agg_calls: ::prost::alloc::vec::Vec<super::expr::AggCall>,
903    #[prost(message, repeated, tag = "3")]
904    pub agg_call_states: ::prost::alloc::vec::Vec<AggCallState>,
905    #[prost(message, optional, tag = "4")]
906    pub intermediate_state_table: ::core::option::Option<super::catalog::Table>,
907    /// Whether to optimize for append only stream.
908    /// It is true when the input is append-only
909    #[prost(bool, tag = "5")]
910    pub is_append_only: bool,
911    #[prost(map = "uint32, message", tag = "6")]
912    pub distinct_dedup_tables: ::std::collections::HashMap<u32, super::catalog::Table>,
913    #[prost(uint32, tag = "7")]
914    pub row_count_index: u32,
915    #[prost(enumeration = "AggNodeVersion", tag = "8")]
916    pub version: i32,
917    /// Required by the downstream `RowMergeNode`,
918    /// currently only used by the `approx_percentile`'s two phase plan
919    #[prost(bool, tag = "9")]
920    pub must_output_per_barrier: bool,
921}
922#[derive(prost_helpers::AnyPB)]
923#[derive(Clone, PartialEq, ::prost::Message)]
924pub struct HashAggNode {
925    #[prost(uint32, repeated, tag = "1")]
926    pub group_key: ::prost::alloc::vec::Vec<u32>,
927    #[prost(message, repeated, tag = "2")]
928    pub agg_calls: ::prost::alloc::vec::Vec<super::expr::AggCall>,
929    #[prost(message, repeated, tag = "3")]
930    pub agg_call_states: ::prost::alloc::vec::Vec<AggCallState>,
931    #[prost(message, optional, tag = "4")]
932    pub intermediate_state_table: ::core::option::Option<super::catalog::Table>,
933    /// Whether to optimize for append only stream.
934    /// It is true when the input is append-only
935    #[prost(bool, tag = "5")]
936    pub is_append_only: bool,
937    #[prost(map = "uint32, message", tag = "6")]
938    pub distinct_dedup_tables: ::std::collections::HashMap<u32, super::catalog::Table>,
939    #[prost(uint32, tag = "7")]
940    pub row_count_index: u32,
941    #[prost(bool, tag = "8")]
942    pub emit_on_window_close: bool,
943    #[prost(enumeration = "AggNodeVersion", tag = "9")]
944    pub version: i32,
945}
946#[derive(prost_helpers::AnyPB)]
947#[derive(Clone, PartialEq, ::prost::Message)]
948pub struct TopNNode {
949    /// 0 means no limit as limit of 0 means this node should be optimized away
950    #[prost(uint64, tag = "1")]
951    pub limit: u64,
952    #[prost(uint64, tag = "2")]
953    pub offset: u64,
954    #[prost(message, optional, tag = "3")]
955    pub table: ::core::option::Option<super::catalog::Table>,
956    #[prost(message, repeated, tag = "4")]
957    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
958    #[prost(bool, tag = "5")]
959    pub with_ties: bool,
960}
961#[derive(prost_helpers::AnyPB)]
962#[derive(Clone, PartialEq, ::prost::Message)]
963pub struct GroupTopNNode {
964    /// 0 means no limit as limit of 0 means this node should be optimized away
965    #[prost(uint64, tag = "1")]
966    pub limit: u64,
967    #[prost(uint64, tag = "2")]
968    pub offset: u64,
969    #[prost(uint32, repeated, tag = "3")]
970    pub group_key: ::prost::alloc::vec::Vec<u32>,
971    #[prost(message, optional, tag = "4")]
972    pub table: ::core::option::Option<super::catalog::Table>,
973    #[prost(message, repeated, tag = "5")]
974    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
975    #[prost(bool, tag = "6")]
976    pub with_ties: bool,
977}
978#[derive(prost_helpers::AnyPB)]
979#[derive(Clone, PartialEq, ::prost::Message)]
980pub struct DeltaExpression {
981    #[prost(enumeration = "super::expr::expr_node::Type", tag = "1")]
982    pub delta_type: i32,
983    #[prost(message, optional, tag = "2")]
984    pub delta: ::core::option::Option<super::expr::ExprNode>,
985}
986/// Deprecated: Use InequalityPairV2 instead.
987#[derive(prost_helpers::AnyPB)]
988#[derive(Clone, PartialEq, ::prost::Message)]
989pub struct InequalityPair {
990    /// Input index of greater side of inequality.
991    #[prost(uint32, tag = "1")]
992    pub key_required_larger: u32,
993    /// Input index of less side of inequality.
994    #[prost(uint32, tag = "2")]
995    pub key_required_smaller: u32,
996    /// Whether this condition is used to clean state table of `HashJoinExecutor`.
997    #[prost(bool, tag = "3")]
998    pub clean_state: bool,
999    /// greater >= less + delta_expression, if `None`, it represents that greater >= less
1000    #[prost(message, optional, tag = "4")]
1001    pub delta_expression: ::core::option::Option<DeltaExpression>,
1002}
1003#[derive(prost_helpers::AnyPB)]
1004#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1005pub struct InequalityPairV2 {
1006    /// Index of the left side of the inequality (from left input).
1007    #[prost(uint32, tag = "1")]
1008    pub left_idx: u32,
1009    /// Index of the right side of the inequality (from right input, NOT offset by left_cols_num).
1010    #[prost(uint32, tag = "2")]
1011    pub right_idx: u32,
1012    /// Whether this condition is used to clean left state table of `HashJoinExecutor`.
1013    #[prost(bool, tag = "3")]
1014    pub clean_left_state: bool,
1015    /// Whether this condition is used to clean right state table of `HashJoinExecutor`.
1016    #[prost(bool, tag = "4")]
1017    pub clean_right_state: bool,
1018    /// Comparison operator: left_col `<op>` right_col (e.g., \<, \<=, >, >=).
1019    #[prost(enumeration = "InequalityType", tag = "5")]
1020    pub op: i32,
1021}
1022#[derive(prost_helpers::AnyPB)]
1023#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1024pub struct JoinKeyWatermarkIndex {
1025    /// Index in `left_key`/`right_key`.
1026    #[prost(uint32, tag = "1")]
1027    pub index: u32,
1028    /// Whether watermark on this join key triggers state cleaning of the counterpart.
1029    #[prost(bool, tag = "2")]
1030    pub do_state_cleaning: bool,
1031}
1032#[derive(prost_helpers::AnyPB)]
1033#[derive(Clone, PartialEq, ::prost::Message)]
1034pub struct HashJoinWatermarkHandleDesc {
1035    /// Join-key positions whose watermarks should be aligned across both sides.
1036    #[prost(message, repeated, tag = "1")]
1037    pub watermark_indices_in_jk: ::prost::alloc::vec::Vec<JoinKeyWatermarkIndex>,
1038    /// Inequality pairs used for watermark generation / state cleaning.
1039    #[prost(message, repeated, tag = "2")]
1040    pub inequality_pairs: ::prost::alloc::vec::Vec<InequalityPairV2>,
1041}
1042#[derive(prost_helpers::AnyPB)]
1043#[derive(Clone, PartialEq, ::prost::Message)]
1044pub struct HashJoinNode {
1045    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
1046    pub join_type: i32,
1047    #[prost(int32, repeated, tag = "2")]
1048    pub left_key: ::prost::alloc::vec::Vec<i32>,
1049    #[prost(int32, repeated, tag = "3")]
1050    pub right_key: ::prost::alloc::vec::Vec<i32>,
1051    #[prost(message, optional, tag = "4")]
1052    pub condition: ::core::option::Option<super::expr::ExprNode>,
1053    /// Used for internal table states.
1054    #[prost(message, optional, tag = "6")]
1055    pub left_table: ::core::option::Option<super::catalog::Table>,
1056    /// Used for internal table states.
1057    #[prost(message, optional, tag = "7")]
1058    pub right_table: ::core::option::Option<super::catalog::Table>,
1059    /// Used for internal table states.
1060    #[prost(message, optional, tag = "8")]
1061    pub left_degree_table: ::core::option::Option<super::catalog::Table>,
1062    /// Used for internal table states.
1063    #[prost(message, optional, tag = "9")]
1064    pub right_degree_table: ::core::option::Option<super::catalog::Table>,
1065    /// The output indices of current node
1066    #[prost(uint32, repeated, tag = "10")]
1067    pub output_indices: ::prost::alloc::vec::Vec<u32>,
1068    /// Left deduped input pk indices. The pk of the left_table and
1069    /// left_degree_table is  \[left_join_key | left_deduped_input_pk_indices\]
1070    /// and is expected to be the shortest key which starts with
1071    /// the join key and satisfies unique constrain.
1072    #[prost(uint32, repeated, tag = "11")]
1073    pub left_deduped_input_pk_indices: ::prost::alloc::vec::Vec<u32>,
1074    /// Right deduped input pk indices. The pk of the right_table and
1075    /// right_degree_table is  \[right_join_key | right_deduped_input_pk_indices\]
1076    /// and is expected to be the shortest key which starts with
1077    /// the join key and satisfies unique constrain.
1078    #[prost(uint32, repeated, tag = "12")]
1079    pub right_deduped_input_pk_indices: ::prost::alloc::vec::Vec<u32>,
1080    #[prost(bool, repeated, tag = "13")]
1081    pub null_safe: ::prost::alloc::vec::Vec<bool>,
1082    /// Whether to optimize for append only stream.
1083    /// It is true when the input is append-only
1084    #[prost(bool, tag = "14")]
1085    pub is_append_only: bool,
1086    /// Which encoding will be used to encode join rows in operator cache.
1087    /// Deprecated. Use the one from `StreamingDeveloperConfig` instead.
1088    #[deprecated]
1089    #[prost(enumeration = "JoinEncodingType", tag = "15")]
1090    pub join_encoding_type: i32,
1091    /// Description of watermark-based and other state cleaning strategies.
1092    #[prost(message, optional, tag = "17")]
1093    pub watermark_handle_desc: ::core::option::Option<HashJoinWatermarkHandleDesc>,
1094}
1095#[derive(prost_helpers::AnyPB)]
1096#[derive(Clone, PartialEq, ::prost::Message)]
1097pub struct AsOfJoinNode {
1098    #[prost(enumeration = "super::plan_common::AsOfJoinType", tag = "1")]
1099    pub join_type: i32,
1100    #[prost(int32, repeated, tag = "2")]
1101    pub left_key: ::prost::alloc::vec::Vec<i32>,
1102    #[prost(int32, repeated, tag = "3")]
1103    pub right_key: ::prost::alloc::vec::Vec<i32>,
1104    /// Used for internal table states.
1105    #[prost(message, optional, tag = "4")]
1106    pub left_table: ::core::option::Option<super::catalog::Table>,
1107    /// Used for internal table states.
1108    #[prost(message, optional, tag = "5")]
1109    pub right_table: ::core::option::Option<super::catalog::Table>,
1110    /// The output indices of current node
1111    #[prost(uint32, repeated, tag = "6")]
1112    pub output_indices: ::prost::alloc::vec::Vec<u32>,
1113    /// Left deduped input pk indices. The pk of the left_table and
1114    /// The pk of the left_table is  \[left_join_key | left_inequality_key | left_deduped_input_pk_indices\]
1115    /// left_inequality_key is not used but for forward compatibility.
1116    #[prost(uint32, repeated, tag = "7")]
1117    pub left_deduped_input_pk_indices: ::prost::alloc::vec::Vec<u32>,
1118    /// Right deduped input pk indices.
1119    /// The pk of the right_table is  \[right_join_key | right_inequality_key | right_deduped_input_pk_indices\]
1120    /// right_inequality_key is not used but for forward compatibility.
1121    #[prost(uint32, repeated, tag = "8")]
1122    pub right_deduped_input_pk_indices: ::prost::alloc::vec::Vec<u32>,
1123    #[prost(bool, repeated, tag = "9")]
1124    pub null_safe: ::prost::alloc::vec::Vec<bool>,
1125    #[prost(message, optional, tag = "10")]
1126    pub asof_desc: ::core::option::Option<super::plan_common::AsOfJoinDesc>,
1127    /// Which encoding will be used to encode join rows in operator cache.
1128    /// Deprecated. Use the one from `StreamingDeveloperConfig` instead.
1129    #[deprecated]
1130    #[prost(enumeration = "JoinEncodingType", tag = "11")]
1131    pub join_encoding_type: i32,
1132    /// Whether to use the cache-based implementation (true) or the no-cache implementation (false).
1133    /// Controlled by session variable `streaming_asof_join_use_cache`.
1134    /// Optional so that legacy plans (without this field) default to true (cache-based).
1135    #[prost(bool, optional, tag = "12")]
1136    pub use_cache: ::core::option::Option<bool>,
1137}
1138#[derive(prost_helpers::AnyPB)]
1139#[derive(Clone, PartialEq, ::prost::Message)]
1140pub struct TemporalJoinNode {
1141    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
1142    pub join_type: i32,
1143    #[prost(int32, repeated, tag = "2")]
1144    pub left_key: ::prost::alloc::vec::Vec<i32>,
1145    #[prost(int32, repeated, tag = "3")]
1146    pub right_key: ::prost::alloc::vec::Vec<i32>,
1147    #[prost(bool, repeated, tag = "4")]
1148    pub null_safe: ::prost::alloc::vec::Vec<bool>,
1149    #[prost(message, optional, tag = "5")]
1150    pub condition: ::core::option::Option<super::expr::ExprNode>,
1151    /// The output indices of current node
1152    #[prost(uint32, repeated, tag = "6")]
1153    pub output_indices: ::prost::alloc::vec::Vec<u32>,
1154    /// The table desc of the lookup side table.
1155    #[prost(message, optional, tag = "7")]
1156    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
1157    /// The output indices of the lookup side table
1158    #[prost(uint32, repeated, tag = "8")]
1159    pub table_output_indices: ::prost::alloc::vec::Vec<u32>,
1160    /// The state table used for non-append-only temporal join.
1161    #[prost(message, optional, tag = "9")]
1162    pub memo_table: ::core::option::Option<super::catalog::Table>,
1163    /// If it is a nested lool temporal join
1164    #[prost(bool, tag = "10")]
1165    pub is_nested_loop: bool,
1166}
1167#[derive(prost_helpers::AnyPB)]
1168#[derive(Clone, PartialEq, ::prost::Message)]
1169pub struct DynamicFilterNode {
1170    #[prost(uint32, tag = "1")]
1171    pub left_key: u32,
1172    /// Must be one of \<, \<=, >, >=
1173    #[prost(message, optional, tag = "2")]
1174    pub condition: ::core::option::Option<super::expr::ExprNode>,
1175    /// Left table stores all states with predicate possibly not NULL.
1176    #[prost(message, optional, tag = "3")]
1177    pub left_table: ::core::option::Option<super::catalog::Table>,
1178    /// Right table stores single value from RHS of predicate.
1179    #[prost(message, optional, tag = "4")]
1180    pub right_table: ::core::option::Option<super::catalog::Table>,
1181    /// If the right side's change always make the condition more relaxed.
1182    /// In other words, make more record in the left side satisfy the condition.
1183    /// If this is true, we need to store LHS records which do not match the condition in the internal table.
1184    /// When the condition changes, we will tell downstream to insert the LHS records which now match the condition.
1185    /// If this is false, we need to store RHS records which match the condition in the internal table.
1186    /// When the condition changes, we will tell downstream to delete the LHS records which now no longer match the condition.
1187    #[deprecated]
1188    #[prost(bool, tag = "5")]
1189    pub condition_always_relax: bool,
1190    /// Whether the dynamic filter can clean its left state table by watermark.
1191    #[prost(bool, tag = "6")]
1192    pub cleaned_by_watermark: bool,
1193}
1194/// Delta join with two indexes. This is a pseudo plan node generated on frontend. On meta
1195/// service, it will be rewritten into lookup joins.
1196#[derive(prost_helpers::AnyPB)]
1197#[derive(Clone, PartialEq, ::prost::Message)]
1198pub struct DeltaIndexJoinNode {
1199    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
1200    pub join_type: i32,
1201    #[prost(int32, repeated, tag = "2")]
1202    pub left_key: ::prost::alloc::vec::Vec<i32>,
1203    #[prost(int32, repeated, tag = "3")]
1204    pub right_key: ::prost::alloc::vec::Vec<i32>,
1205    #[prost(message, optional, tag = "4")]
1206    pub condition: ::core::option::Option<super::expr::ExprNode>,
1207    /// Table id of the left index.
1208    #[prost(uint32, tag = "7", wrapper = "crate::id::TableId")]
1209    pub left_table_id: crate::id::TableId,
1210    /// Table id of the right index.
1211    #[prost(uint32, tag = "8", wrapper = "crate::id::TableId")]
1212    pub right_table_id: crate::id::TableId,
1213    /// Info about the left index
1214    #[prost(message, optional, tag = "9")]
1215    pub left_info: ::core::option::Option<ArrangementInfo>,
1216    /// Info about the right index
1217    #[prost(message, optional, tag = "10")]
1218    pub right_info: ::core::option::Option<ArrangementInfo>,
1219    /// the output indices of current node
1220    #[prost(uint32, repeated, tag = "11")]
1221    pub output_indices: ::prost::alloc::vec::Vec<u32>,
1222}
1223#[derive(prost_helpers::AnyPB)]
1224#[derive(Clone, PartialEq, ::prost::Message)]
1225pub struct HopWindowNode {
1226    #[prost(uint32, tag = "1")]
1227    pub time_col: u32,
1228    #[prost(message, optional, tag = "2")]
1229    pub window_slide: ::core::option::Option<super::data::Interval>,
1230    #[prost(message, optional, tag = "3")]
1231    pub window_size: ::core::option::Option<super::data::Interval>,
1232    #[prost(uint32, repeated, tag = "4")]
1233    pub output_indices: ::prost::alloc::vec::Vec<u32>,
1234    #[prost(message, repeated, tag = "5")]
1235    pub window_start_exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
1236    #[prost(message, repeated, tag = "6")]
1237    pub window_end_exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
1238}
1239#[derive(prost_helpers::AnyPB)]
1240#[derive(Clone, PartialEq, ::prost::Message)]
1241pub struct MergeNode {
1242    /// **WARNING**: Use this field with caution.
1243    ///
1244    /// `upstream_actor_id` stored in the plan node in `Fragment` meta model cannot be directly used.
1245    /// See `compose_fragment`.
1246    /// The field is deprecated because the upstream actor info is provided separately instead of
1247    /// injected here in the node.
1248    #[deprecated]
1249    #[prost(uint32, repeated, packed = "false", tag = "1")]
1250    pub upstream_actor_id: ::prost::alloc::vec::Vec<u32>,
1251    #[prost(uint32, tag = "2", wrapper = "crate::id::FragmentId")]
1252    pub upstream_fragment_id: crate::id::FragmentId,
1253    /// Type of the upstream dispatcher. If there's always one upstream according to this
1254    /// type, the compute node may use the `ReceiverExecutor` as an optimization.
1255    #[prost(enumeration = "DispatcherType", tag = "3")]
1256    pub upstream_dispatcher_type: i32,
1257    /// The schema of input columns. Already deprecated.
1258    #[deprecated]
1259    #[prost(message, repeated, tag = "4")]
1260    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
1261    /// Allows this merge to start without upstream actors and receive them later through a MergeUpdate.
1262    #[prost(bool, tag = "5")]
1263    pub allow_no_initial_upstream: bool,
1264}
1265/// passed from frontend to meta, used by fragmenter to generate `MergeNode`
1266/// and maybe `DispatcherNode` later.
1267#[derive(prost_helpers::AnyPB)]
1268#[derive(Clone, PartialEq, ::prost::Message)]
1269pub struct ExchangeNode {
1270    #[prost(message, optional, tag = "1")]
1271    pub strategy: ::core::option::Option<DispatchStrategy>,
1272}
1273/// StreamScanNode reads data from upstream table first, and then pass all events to downstream.
1274/// It always these 2 inputs in the following order:
1275///
1276/// 1. A MergeNode (as a placeholder) of upstream.
1277/// 1. A BatchPlanNode for the snapshot read.
1278#[derive(prost_helpers::AnyPB)]
1279#[derive(Clone, PartialEq, ::prost::Message)]
1280pub struct StreamScanNode {
1281    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
1282    pub table_id: crate::id::TableId,
1283    /// The columns from the upstream table that'll be internally required by this stream scan node.
1284    ///
1285    /// * For non-backfill stream scan node, it's the same as the output columns.
1286    /// * For backfill stream scan node, there're additionally primary key columns.
1287    #[prost(int32, repeated, tag = "2")]
1288    pub upstream_column_ids: ::prost::alloc::vec::Vec<i32>,
1289    /// The columns to be output by this stream scan node. The index is based on the internal required columns.
1290    ///
1291    /// * For non-backfill stream scan node, it's simply all the columns.
1292    /// * For backfill stream scan node, this strips the primary key columns if they're unnecessary.
1293    #[prost(uint32, repeated, tag = "3")]
1294    pub output_indices: ::prost::alloc::vec::Vec<u32>,
1295    /// Generally, the barrier needs to be rearranged during the MV creation process, so that data can
1296    /// be flushed to shared buffer periodically, instead of making the first epoch from batch query extra
1297    /// large. However, in some cases, e.g., shared state, the barrier cannot be rearranged in StreamScanNode.
1298    /// StreamScanType is used to decide which implementation for the StreamScanNode.
1299    #[prost(enumeration = "StreamScanType", tag = "4")]
1300    pub stream_scan_type: i32,
1301    /// / The state table used by Backfill operator for persisting internal state
1302    #[prost(message, optional, tag = "5")]
1303    pub state_table: ::core::option::Option<super::catalog::Table>,
1304    /// The upstream materialized view info used by backfill.
1305    /// Used iff `ChainType::Backfill`.
1306    #[prost(message, optional, tag = "7")]
1307    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
1308    /// The backfill rate limit for the stream scan node.
1309    #[prost(uint32, optional, tag = "8")]
1310    pub rate_limit: ::core::option::Option<u32>,
1311    /// Snapshot read every N barriers
1312    #[deprecated]
1313    #[prost(uint32, tag = "9")]
1314    pub snapshot_read_barrier_interval: u32,
1315    /// The state table used by ArrangementBackfill to replicate upstream mview's state table.
1316    /// Used iff `ChainType::ArrangementBackfill`.
1317    #[prost(message, optional, tag = "10")]
1318    pub arrangement_table: ::core::option::Option<super::catalog::Table>,
1319    #[prost(uint64, optional, tag = "11")]
1320    pub snapshot_backfill_epoch: ::core::option::Option<u64>,
1321    /// Full scan range pushdown (eq_conds + range bounds on PK).
1322    #[prost(message, optional, tag = "13")]
1323    pub pk_scan_range: ::core::option::Option<super::batch_plan::ScanRange>,
1324}
1325/// Config options for CDC backfill
1326#[derive(prost_helpers::AnyPB)]
1327#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1328pub struct StreamCdcScanOptions {
1329    /// Whether skip the backfill and only consume from upstream.
1330    #[prost(bool, tag = "1")]
1331    pub disable_backfill: bool,
1332    #[prost(uint32, tag = "2")]
1333    pub snapshot_barrier_interval: u32,
1334    #[prost(uint32, tag = "3")]
1335    pub snapshot_batch_size: u32,
1336    #[prost(uint32, tag = "4")]
1337    pub backfill_parallelism: u32,
1338    #[prost(uint64, tag = "5")]
1339    pub backfill_num_rows_per_split: u64,
1340    #[prost(bool, tag = "6")]
1341    pub backfill_as_even_splits: bool,
1342    #[prost(uint32, tag = "7")]
1343    pub backfill_split_pk_column_index: u32,
1344}
1345#[derive(prost_helpers::AnyPB)]
1346#[derive(Clone, PartialEq, ::prost::Message)]
1347pub struct StreamCdcScanNode {
1348    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
1349    pub table_id: crate::id::TableId,
1350    /// The columns from the upstream table that'll be internally required by this stream scan node.
1351    /// Contains Primary Keys and Output columns.
1352    #[prost(int32, repeated, tag = "2")]
1353    pub upstream_column_ids: ::prost::alloc::vec::Vec<i32>,
1354    /// Strips the primary key columns if they're unnecessary.
1355    #[prost(uint32, repeated, tag = "3")]
1356    pub output_indices: ::prost::alloc::vec::Vec<u32>,
1357    /// The state table used by CdcBackfill operator for persisting internal state
1358    #[prost(message, optional, tag = "4")]
1359    pub state_table: ::core::option::Option<super::catalog::Table>,
1360    /// The external table that will be backfilled for CDC.
1361    #[prost(message, optional, tag = "5")]
1362    pub cdc_table_desc: ::core::option::Option<super::plan_common::ExternalTableDesc>,
1363    /// The backfill rate limit for the stream cdc scan node.
1364    #[prost(uint32, optional, tag = "6")]
1365    pub rate_limit: ::core::option::Option<u32>,
1366    /// Whether skip the backfill and only consume from upstream.
1367    /// keep it for backward compatibility, new stream plan will use `options.disable_backfill`
1368    #[prost(bool, tag = "7")]
1369    pub disable_backfill: bool,
1370    #[prost(message, optional, tag = "8")]
1371    pub options: ::core::option::Option<StreamCdcScanOptions>,
1372}
1373/// BatchPlanNode is used for mv on mv snapshot read.
1374/// BatchPlanNode is supposed to carry a batch plan that can be optimized with the streaming plan_common.
1375/// Currently, streaming to batch push down is not yet supported, BatchPlanNode is simply a table scan.
1376#[derive(prost_helpers::AnyPB)]
1377#[derive(Clone, PartialEq, ::prost::Message)]
1378pub struct BatchPlanNode {
1379    #[prost(message, optional, tag = "1")]
1380    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
1381    #[prost(int32, repeated, tag = "2")]
1382    pub column_ids: ::prost::alloc::vec::Vec<i32>,
1383}
1384#[derive(prost_helpers::AnyPB)]
1385#[derive(Clone, PartialEq, ::prost::Message)]
1386pub struct ArrangementInfo {
1387    /// Order key of the arrangement, including order by columns and pk from the materialize
1388    /// executor.
1389    #[prost(message, repeated, tag = "1")]
1390    pub arrange_key_orders: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1391    /// Column descs of the arrangement
1392    #[prost(message, repeated, tag = "2")]
1393    pub column_descs: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
1394    /// Used to build storage table by stream lookup join of delta join.
1395    #[prost(message, optional, tag = "4")]
1396    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
1397    /// Output index columns
1398    #[prost(uint32, repeated, tag = "5")]
1399    pub output_col_idx: ::prost::alloc::vec::Vec<u32>,
1400}
1401/// Special node for shared state, which will only be produced in fragmenter. ArrangeNode will
1402/// produce a special Materialize executor, which materializes data for downstream to query.
1403#[derive(prost_helpers::AnyPB)]
1404#[derive(Clone, PartialEq, ::prost::Message)]
1405pub struct ArrangeNode {
1406    /// Info about the arrangement
1407    #[prost(message, optional, tag = "1")]
1408    pub table_info: ::core::option::Option<ArrangementInfo>,
1409    /// Hash key of the materialize node, which is a subset of pk.
1410    #[prost(uint32, repeated, tag = "2")]
1411    pub distribution_key: ::prost::alloc::vec::Vec<u32>,
1412    /// Used for internal table states.
1413    #[prost(message, optional, tag = "3")]
1414    pub table: ::core::option::Option<super::catalog::Table>,
1415}
1416/// Special node for shared state. LookupNode will join an arrangement with a stream.
1417#[derive(prost_helpers::AnyPB)]
1418#[derive(Clone, PartialEq, ::prost::Message)]
1419pub struct LookupNode {
1420    /// Join key of the arrangement side
1421    #[prost(int32, repeated, tag = "1")]
1422    pub arrange_key: ::prost::alloc::vec::Vec<i32>,
1423    /// Join key of the stream side
1424    #[prost(int32, repeated, tag = "2")]
1425    pub stream_key: ::prost::alloc::vec::Vec<i32>,
1426    /// Whether to join the current epoch of arrangement
1427    #[prost(bool, tag = "3")]
1428    pub use_current_epoch: bool,
1429    /// Sometimes we need to re-order the output data to meet the requirement of schema.
1430    /// By default, lookup executor will produce `<arrangement side, stream side>`. We
1431    /// will then apply the column mapping to the combined result.
1432    #[prost(int32, repeated, tag = "4")]
1433    pub column_mapping: ::prost::alloc::vec::Vec<i32>,
1434    /// Info about the arrangement
1435    #[prost(message, optional, tag = "7")]
1436    pub arrangement_table_info: ::core::option::Option<ArrangementInfo>,
1437    #[prost(oneof = "lookup_node::ArrangementTableId", tags = "5, 6")]
1438    pub arrangement_table_id: ::core::option::Option<lookup_node::ArrangementTableId>,
1439}
1440/// Nested message and enum types in `LookupNode`.
1441pub mod lookup_node {
1442    #[derive(prost_helpers::AnyPB)]
1443    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
1444    pub enum ArrangementTableId {
1445        /// Table Id of the arrangement (when created along with join plan)
1446        #[prost(uint32, tag = "5", wrapper = "crate::id::TableId")]
1447        TableId(crate::id::TableId),
1448        /// Table Id of the arrangement (when using index)
1449        #[prost(uint32, tag = "6", wrapper = "crate::id::TableId")]
1450        IndexId(crate::id::TableId),
1451    }
1452}
1453/// WatermarkFilter needs to filter the upstream data by the water mark.
1454#[derive(prost_helpers::AnyPB)]
1455#[derive(Clone, PartialEq, ::prost::Message)]
1456pub struct WatermarkFilterNode {
1457    /// The watermark descs
1458    #[prost(message, repeated, tag = "1")]
1459    pub watermark_descs: ::prost::alloc::vec::Vec<super::catalog::WatermarkDesc>,
1460    /// The tables used to persist watermarks, the key is vnode.
1461    #[prost(message, repeated, tag = "2")]
1462    pub tables: ::prost::alloc::vec::Vec<super::catalog::Table>,
1463}
1464/// Acts like a merger, but on different inputs.
1465#[derive(prost_helpers::AnyPB)]
1466#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1467pub struct UnionNode {}
1468/// Special node for shared state. Merge and align barrier from upstreams. Pipe inputs in order.
1469#[derive(prost_helpers::AnyPB)]
1470#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1471pub struct LookupUnionNode {
1472    #[prost(uint32, repeated, tag = "1")]
1473    pub order: ::prost::alloc::vec::Vec<u32>,
1474}
1475#[derive(prost_helpers::AnyPB)]
1476#[derive(Clone, PartialEq, ::prost::Message)]
1477pub struct ExpandNode {
1478    #[prost(message, repeated, tag = "1")]
1479    pub column_subsets: ::prost::alloc::vec::Vec<expand_node::Subset>,
1480}
1481/// Nested message and enum types in `ExpandNode`.
1482pub mod expand_node {
1483    #[derive(prost_helpers::AnyPB)]
1484    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1485    pub struct Subset {
1486        #[prost(uint32, repeated, tag = "1")]
1487        pub column_indices: ::prost::alloc::vec::Vec<u32>,
1488    }
1489}
1490#[derive(prost_helpers::AnyPB)]
1491#[derive(Clone, PartialEq, ::prost::Message)]
1492pub struct ProjectSetNode {
1493    #[prost(message, repeated, tag = "1")]
1494    pub select_list: ::prost::alloc::vec::Vec<super::expr::ProjectSetSelectItem>,
1495    /// this two field is expressing a list of usize pair, which means when project receives a
1496    /// watermark with `watermark_input_cols\[i\]` column index, it should derive a new watermark
1497    /// with `watermark_output_cols\[i\]`th expression
1498    #[prost(uint32, repeated, tag = "2")]
1499    pub watermark_input_cols: ::prost::alloc::vec::Vec<u32>,
1500    #[prost(uint32, repeated, tag = "3")]
1501    pub watermark_expr_indices: ::prost::alloc::vec::Vec<u32>,
1502    #[prost(uint32, repeated, tag = "4")]
1503    pub nondecreasing_exprs: ::prost::alloc::vec::Vec<u32>,
1504}
1505/// Sorts inputs and outputs ordered data based on watermark.
1506#[derive(prost_helpers::AnyPB)]
1507#[derive(Clone, PartialEq, ::prost::Message)]
1508pub struct SortNode {
1509    /// Persists data above watermark.
1510    #[prost(message, optional, tag = "1")]
1511    pub state_table: ::core::option::Option<super::catalog::Table>,
1512    /// Column index of watermark to perform sorting.
1513    #[prost(uint32, tag = "2")]
1514    pub sort_column_index: u32,
1515}
1516/// Merges two streams from streaming and batch for data manipulation.
1517#[derive(prost_helpers::AnyPB)]
1518#[derive(Clone, PartialEq, ::prost::Message)]
1519pub struct DmlNode {
1520    /// Id of the table on which DML performs.
1521    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
1522    pub table_id: crate::id::TableId,
1523    /// Version of the table.
1524    #[prost(uint64, tag = "3")]
1525    pub table_version_id: u64,
1526    /// Column descriptions of the table.
1527    #[prost(message, repeated, tag = "2")]
1528    pub column_descs: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
1529    #[prost(uint32, optional, tag = "4")]
1530    pub rate_limit: ::core::option::Option<u32>,
1531}
1532#[derive(prost_helpers::AnyPB)]
1533#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1534pub struct RowIdGenNode {
1535    #[prost(uint64, tag = "1")]
1536    pub row_id_index: u64,
1537}
1538#[derive(prost_helpers::AnyPB)]
1539#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1540pub struct NowModeUpdateCurrent {}
1541#[derive(prost_helpers::AnyPB)]
1542#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1543pub struct NowModeGenerateSeries {
1544    #[prost(message, optional, tag = "1")]
1545    pub start_timestamp: ::core::option::Option<super::data::Datum>,
1546    #[prost(message, optional, tag = "2")]
1547    pub interval: ::core::option::Option<super::data::Datum>,
1548}
1549#[derive(prost_helpers::AnyPB)]
1550#[derive(Clone, PartialEq, ::prost::Message)]
1551pub struct NowNode {
1552    /// Persists emitted 'now'.
1553    #[prost(message, optional, tag = "1")]
1554    pub state_table: ::core::option::Option<super::catalog::Table>,
1555    #[prost(oneof = "now_node::Mode", tags = "101, 102")]
1556    pub mode: ::core::option::Option<now_node::Mode>,
1557}
1558/// Nested message and enum types in `NowNode`.
1559pub mod now_node {
1560    #[derive(prost_helpers::AnyPB)]
1561    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1562    pub enum Mode {
1563        #[prost(message, tag = "101")]
1564        UpdateCurrent(super::NowModeUpdateCurrent),
1565        #[prost(message, tag = "102")]
1566        GenerateSeries(super::NowModeGenerateSeries),
1567    }
1568}
1569#[derive(prost_helpers::AnyPB)]
1570#[derive(Clone, PartialEq, ::prost::Message)]
1571pub struct ValuesNode {
1572    #[prost(message, repeated, tag = "1")]
1573    pub tuples: ::prost::alloc::vec::Vec<values_node::ExprTuple>,
1574    #[prost(message, repeated, tag = "2")]
1575    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
1576}
1577/// Nested message and enum types in `ValuesNode`.
1578pub mod values_node {
1579    #[derive(prost_helpers::AnyPB)]
1580    #[derive(Clone, PartialEq, ::prost::Message)]
1581    pub struct ExprTuple {
1582        #[prost(message, repeated, tag = "1")]
1583        pub cells: ::prost::alloc::vec::Vec<super::super::expr::ExprNode>,
1584    }
1585}
1586#[derive(prost_helpers::AnyPB)]
1587#[derive(Clone, PartialEq, ::prost::Message)]
1588pub struct DedupNode {
1589    #[prost(message, optional, tag = "1")]
1590    pub state_table: ::core::option::Option<super::catalog::Table>,
1591    #[prost(uint32, repeated, tag = "2")]
1592    pub dedup_column_indices: ::prost::alloc::vec::Vec<u32>,
1593}
1594#[derive(prost_helpers::AnyPB)]
1595#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1596pub struct NoOpNode {}
1597#[derive(prost_helpers::AnyPB)]
1598#[derive(Clone, PartialEq, ::prost::Message)]
1599pub struct EowcOverWindowNode {
1600    #[prost(message, repeated, tag = "1")]
1601    pub calls: ::prost::alloc::vec::Vec<super::expr::WindowFunction>,
1602    #[prost(uint32, repeated, tag = "2")]
1603    pub partition_by: ::prost::alloc::vec::Vec<u32>,
1604    /// use `repeated` in case of future extension, now only one column is allowed
1605    #[prost(message, repeated, tag = "3")]
1606    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1607    #[prost(message, optional, tag = "4")]
1608    pub state_table: ::core::option::Option<super::catalog::Table>,
1609    /// Optional state table for persisting window function intermediate states.
1610    /// Currently used for numbering functions (row_number/rank/dense_rank).
1611    #[prost(message, optional, tag = "5")]
1612    pub intermediate_state_table: ::core::option::Option<super::catalog::Table>,
1613}
1614#[derive(prost_helpers::AnyPB)]
1615#[derive(Clone, PartialEq, ::prost::Message)]
1616pub struct OverWindowNode {
1617    #[prost(message, repeated, tag = "1")]
1618    pub calls: ::prost::alloc::vec::Vec<super::expr::WindowFunction>,
1619    #[prost(uint32, repeated, tag = "2")]
1620    pub partition_by: ::prost::alloc::vec::Vec<u32>,
1621    #[prost(message, repeated, tag = "3")]
1622    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1623    #[prost(message, optional, tag = "4")]
1624    pub state_table: ::core::option::Option<super::catalog::Table>,
1625    /// Deprecated. Use the one from `StreamingDeveloperConfig` instead.
1626    #[deprecated]
1627    #[prost(enumeration = "OverWindowCachePolicy", tag = "5")]
1628    pub cache_policy: i32,
1629}
1630#[derive(prost_helpers::AnyPB)]
1631#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1632pub struct LocalApproxPercentileNode {
1633    #[prost(double, tag = "1")]
1634    pub base: f64,
1635    #[prost(uint32, tag = "2")]
1636    pub percentile_index: u32,
1637}
1638#[derive(prost_helpers::AnyPB)]
1639#[derive(Clone, PartialEq, ::prost::Message)]
1640pub struct GlobalApproxPercentileNode {
1641    #[prost(double, tag = "1")]
1642    pub base: f64,
1643    #[prost(double, tag = "2")]
1644    pub quantile: f64,
1645    #[prost(message, optional, tag = "3")]
1646    pub bucket_state_table: ::core::option::Option<super::catalog::Table>,
1647    #[prost(message, optional, tag = "4")]
1648    pub count_state_table: ::core::option::Option<super::catalog::Table>,
1649}
1650#[derive(prost_helpers::AnyPB)]
1651#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1652pub struct RowMergeNode {
1653    #[prost(message, optional, tag = "1")]
1654    pub lhs_mapping: ::core::option::Option<super::catalog::ColIndexMapping>,
1655    #[prost(message, optional, tag = "2")]
1656    pub rhs_mapping: ::core::option::Option<super::catalog::ColIndexMapping>,
1657}
1658#[derive(prost_helpers::AnyPB)]
1659#[derive(Clone, PartialEq, ::prost::Message)]
1660pub struct SyncLogStoreNode {
1661    #[prost(message, optional, tag = "1")]
1662    pub log_store_table: ::core::option::Option<super::catalog::Table>,
1663    /// Deprecated. Use the one from `StreamingDeveloperConfig` instead.
1664    #[deprecated]
1665    #[prost(uint32, optional, tag = "2")]
1666    pub pause_duration_ms: ::core::option::Option<u32>,
1667    /// Deprecated. Use the one from `StreamingDeveloperConfig` instead.
1668    #[deprecated]
1669    #[prost(uint32, optional, tag = "3")]
1670    pub buffer_size: ::core::option::Option<u32>,
1671    #[prost(bool, tag = "4")]
1672    pub aligned: bool,
1673}
1674#[derive(prost_helpers::AnyPB)]
1675#[derive(Clone, PartialEq, ::prost::Message)]
1676pub struct MaterializedExprsNode {
1677    #[prost(message, repeated, tag = "1")]
1678    pub exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
1679    #[prost(message, optional, tag = "2")]
1680    pub state_table: ::core::option::Option<super::catalog::Table>,
1681    #[prost(uint32, optional, tag = "3")]
1682    pub state_clean_col_idx: ::core::option::Option<u32>,
1683}
1684#[derive(prost_helpers::AnyPB)]
1685#[derive(Clone, PartialEq, ::prost::Message)]
1686pub struct VectorIndexWriteNode {
1687    #[prost(message, optional, tag = "1")]
1688    pub table: ::core::option::Option<super::catalog::Table>,
1689}
1690#[derive(prost_helpers::AnyPB)]
1691#[derive(Clone, PartialEq, ::prost::Message)]
1692pub struct VectorIndexLookupJoinNode {
1693    #[prost(message, optional, tag = "1")]
1694    pub reader_desc: ::core::option::Option<super::plan_common::VectorIndexReaderDesc>,
1695    #[prost(uint32, tag = "2")]
1696    pub vector_column_idx: u32,
1697}
1698#[derive(prost_helpers::AnyPB)]
1699#[derive(Clone, PartialEq, ::prost::Message)]
1700pub struct UpstreamSinkUnionNode {
1701    /// It is always empty in the persisted metadata, and get filled before we spawn the actors.
1702    /// The actual upstream info may be added and removed dynamically at runtime.
1703    #[prost(message, repeated, tag = "1")]
1704    pub init_upstreams: ::prost::alloc::vec::Vec<UpstreamSinkInfo>,
1705}
1706#[derive(prost_helpers::AnyPB)]
1707#[derive(Clone, PartialEq, ::prost::Message)]
1708pub struct LocalityProviderNode {
1709    /// Column indices that define locality
1710    #[prost(uint32, repeated, tag = "1")]
1711    pub locality_columns: ::prost::alloc::vec::Vec<u32>,
1712    /// State table for buffering input data
1713    #[prost(message, optional, tag = "2")]
1714    pub state_table: ::core::option::Option<super::catalog::Table>,
1715    /// Progress table for tracking backfill progress
1716    #[prost(message, optional, tag = "3")]
1717    pub progress_table: ::core::option::Option<super::catalog::Table>,
1718}
1719#[derive(prost_helpers::AnyPB)]
1720#[derive(Clone, PartialEq, ::prost::Message)]
1721pub struct EowcGapFillNode {
1722    #[prost(uint32, tag = "1")]
1723    pub time_column_index: u32,
1724    #[prost(message, optional, tag = "2")]
1725    pub interval: ::core::option::Option<super::expr::ExprNode>,
1726    #[prost(uint32, repeated, tag = "3")]
1727    pub fill_columns: ::prost::alloc::vec::Vec<u32>,
1728    #[prost(string, repeated, tag = "4")]
1729    pub fill_strategies: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1730    #[prost(message, optional, tag = "6")]
1731    pub prev_row_table: ::core::option::Option<super::catalog::Table>,
1732    #[prost(uint32, repeated, tag = "7")]
1733    pub partition_by_indices: ::prost::alloc::vec::Vec<u32>,
1734}
1735#[derive(prost_helpers::AnyPB)]
1736#[derive(Clone, PartialEq, ::prost::Message)]
1737pub struct GapFillNode {
1738    #[prost(uint32, tag = "1")]
1739    pub time_column_index: u32,
1740    #[prost(message, optional, tag = "2")]
1741    pub interval: ::core::option::Option<super::expr::ExprNode>,
1742    #[prost(uint32, repeated, tag = "3")]
1743    pub fill_columns: ::prost::alloc::vec::Vec<u32>,
1744    #[prost(string, repeated, tag = "4")]
1745    pub fill_strategies: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1746    #[prost(message, optional, tag = "5")]
1747    pub state_table: ::core::option::Option<super::catalog::Table>,
1748    #[prost(uint32, repeated, tag = "6")]
1749    pub partition_by_indices: ::prost::alloc::vec::Vec<u32>,
1750    #[prost(uint32, repeated, tag = "7")]
1751    pub pointer_key_indices: ::prost::alloc::vec::Vec<u32>,
1752}
1753/// SQL:2016 MATCH_RECOGNIZE (row pattern recognition). v1: append-only input,
1754/// ONE ROW PER MATCH. PARTITION BY / ORDER BY are input column indices.
1755#[derive(prost_helpers::AnyPB)]
1756#[derive(Clone, PartialEq, ::prost::Message)]
1757pub struct MatchRecognizeNode {
1758    #[prost(uint32, repeated, tag = "1")]
1759    pub partition_by: ::prost::alloc::vec::Vec<u32>,
1760    /// ORDER BY keys, carried as ColumnOrder like every other ordered streaming node. v1 only supports
1761    /// the default ascending order (the binder rejects DESC / explicit NULLS); the executor asserts it.
1762    #[prost(message, repeated, tag = "2")]
1763    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1764    #[prost(message, repeated, tag = "3")]
1765    pub measures: ::prost::alloc::vec::Vec<MatchRecognizeMeasure>,
1766    #[prost(message, repeated, tag = "5")]
1767    pub defines: ::prost::alloc::vec::Vec<MatchRecognizeDefine>,
1768    /// The PATTERN clause as a structured tree (the v1 subset: variables, concatenation, alternation,
1769    /// quantification and PERMUTE; anchors and exclusions are rejected at parse time). Field 7
1770    /// previously carried the pattern as text; it is now reserved.
1771    #[prost(message, optional, tag = "12")]
1772    pub pattern_node: ::core::option::Option<MatchRecognizePatternNode>,
1773    /// Rows referenced by live partial matches, keyed (partition..., order..., seq): the retained
1774    /// window the matcher re-feeds on recovery. Input arrives already ordered (see `input_mode`), so
1775    /// this holds only what live matches still need -- there is no out-of-order buffer here.
1776    #[prost(message, optional, tag = "8")]
1777    pub state_table: ::core::option::Option<super::catalog::Table>,
1778    /// AFTER MATCH SKIP strategy.
1779    #[prost(message, optional, tag = "9")]
1780    pub after_match_skip: ::core::option::Option<MatchRecognizeAfterMatchSkip>,
1781    /// WITHIN span check: a predicate over a synthetic `\[last_order_key, first_order_key\]` row
1782    /// (`InputRef(0) - InputRef(1) <= interval`). Absent when there is no WITHIN clause.
1783    #[prost(message, optional, tag = "11")]
1784    pub within: ::core::option::Option<super::expr::ExprNode>,
1785    /// WITHIN deadline: `first_order_key + interval` over a synthetic `\[first_order_key\]` row
1786    /// (`InputRef(0) + interval`). The watermark at which a partial starting at that row expires;
1787    /// used to wake an idle partition to evict it. Absent when there is no WITHIN clause.
1788    #[prost(message, optional, tag = "15")]
1789    pub within_deadline: ::core::option::Option<super::expr::ExprNode>,
1790    /// How the ordered-input requirement is satisfied. EVENT_TIME: an EowcSort upstream (same
1791    /// fragment) emits rows in full ORDER BY order, strictly below each forwarded watermark.
1792    /// PROCESSING_TIME (not yet planned): rows are matched in observed arrival order.
1793    #[prost(enumeration = "MatchRecognizeInputMode", tag = "16")]
1794    pub input_mode: i32,
1795}
1796/// A node in the structured row pattern tree, mirroring the executor-side pattern AST. Groups and
1797/// anchors are not represented: parenthesized groups are flattened during lowering, and anchors /
1798/// exclusions are rejected at planning time (not supported in v1).
1799#[derive(prost_helpers::AnyPB)]
1800#[derive(Clone, PartialEq, ::prost::Message)]
1801pub struct MatchRecognizePatternNode {
1802    #[prost(oneof = "match_recognize_pattern_node::Node", tags = "1, 2, 3, 4, 5")]
1803    pub node: ::core::option::Option<match_recognize_pattern_node::Node>,
1804}
1805/// Nested message and enum types in `MatchRecognizePatternNode`.
1806pub mod match_recognize_pattern_node {
1807    #[derive(prost_helpers::AnyPB)]
1808    #[derive(Clone, PartialEq, ::prost::Oneof)]
1809    pub enum Node {
1810        /// A pattern variable, e.g. `A`.
1811        #[prost(string, tag = "1")]
1812        Var(::prost::alloc::string::String),
1813        /// Concatenation, e.g. `A B C`.
1814        #[prost(message, tag = "2")]
1815        Concat(super::MatchRecognizePatternSeq),
1816        /// Alternation, e.g. `A | B | C`.
1817        #[prost(message, tag = "3")]
1818        Alternation(super::MatchRecognizePatternSeq),
1819        /// A quantified sub-pattern, e.g. `A+`.
1820        #[prost(message, tag = "4")]
1821        Quantified(::prost::alloc::boxed::Box<super::MatchRecognizeQuantifiedPattern>),
1822        /// `PERMUTE(a, b, ...)`.
1823        #[prost(message, tag = "5")]
1824        Permute(super::MatchRecognizePermutePattern),
1825    }
1826}
1827/// An ordered list of sub-patterns (the operands of a concatenation or alternation).
1828#[derive(prost_helpers::AnyPB)]
1829#[derive(Clone, PartialEq, ::prost::Message)]
1830pub struct MatchRecognizePatternSeq {
1831    #[prost(message, repeated, tag = "1")]
1832    pub patterns: ::prost::alloc::vec::Vec<MatchRecognizePatternNode>,
1833}
1834/// `PERMUTE(a, b, ...)` over the listed pattern variables.
1835#[derive(prost_helpers::AnyPB)]
1836#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1837pub struct MatchRecognizePermutePattern {
1838    #[prost(string, repeated, tag = "1")]
1839    pub vars: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1840}
1841/// A sub-pattern with a quantifier, e.g. `A+`, `A*?`, `A{1,3}`.
1842#[derive(prost_helpers::AnyPB)]
1843#[derive(Clone, PartialEq, ::prost::Message)]
1844pub struct MatchRecognizeQuantifiedPattern {
1845    #[prost(message, optional, boxed, tag = "1")]
1846    pub inner: ::core::option::Option<
1847        ::prost::alloc::boxed::Box<MatchRecognizePatternNode>,
1848    >,
1849    #[prost(message, optional, tag = "2")]
1850    pub quantifier: ::core::option::Option<MatchRecognizeQuantifier>,
1851    /// A trailing `?` (e.g. `A*?`) — prefer the fewest repetitions.
1852    #[prost(bool, tag = "3")]
1853    pub reluctant: bool,
1854}
1855/// A row-pattern quantifier.
1856#[derive(prost_helpers::AnyPB)]
1857#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1858pub struct MatchRecognizeQuantifier {
1859    #[prost(enumeration = "match_recognize_quantifier::Kind", tag = "1")]
1860    pub kind: i32,
1861    /// For RANGE: minimum repetitions (defaults to 0).
1862    #[prost(uint32, tag = "2")]
1863    pub min: u32,
1864    /// For RANGE: maximum repetitions; absent means unbounded.
1865    #[prost(uint32, optional, tag = "3")]
1866    pub max: ::core::option::Option<u32>,
1867}
1868/// Nested message and enum types in `MatchRecognizeQuantifier`.
1869pub mod match_recognize_quantifier {
1870    #[derive(prost_helpers::AnyPB)]
1871    #[derive(
1872        Clone,
1873        Copy,
1874        Debug,
1875        PartialEq,
1876        Eq,
1877        Hash,
1878        PartialOrd,
1879        Ord,
1880        ::prost::Enumeration
1881    )]
1882    #[repr(i32)]
1883    pub enum Kind {
1884        Unspecified = 0,
1885        /// `*`
1886        Star = 1,
1887        /// `+`
1888        Plus = 2,
1889        /// `?`
1890        Question = 3,
1891        /// `{min,max}` (and its `{n}`, `{n,}`, `{,m}` forms).
1892        Range = 4,
1893    }
1894    impl Kind {
1895        /// String value of the enum field names used in the ProtoBuf definition.
1896        ///
1897        /// The values are not transformed in any way and thus are considered stable
1898        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1899        pub fn as_str_name(&self) -> &'static str {
1900            match self {
1901                Self::Unspecified => "KIND_UNSPECIFIED",
1902                Self::Star => "KIND_STAR",
1903                Self::Plus => "KIND_PLUS",
1904                Self::Question => "KIND_QUESTION",
1905                Self::Range => "KIND_RANGE",
1906            }
1907        }
1908        /// Creates an enum from field names used in the ProtoBuf definition.
1909        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1910            match value {
1911                "KIND_UNSPECIFIED" => Some(Self::Unspecified),
1912                "KIND_STAR" => Some(Self::Star),
1913                "KIND_PLUS" => Some(Self::Plus),
1914                "KIND_QUESTION" => Some(Self::Question),
1915                "KIND_RANGE" => Some(Self::Range),
1916                _ => None,
1917            }
1918        }
1919    }
1920}
1921/// A DEFINE predicate. The condition is evaluated, per candidate row during matching, over a
1922/// synthetic row whose i-th column is produced by slots\[i\] from the candidate row, its physical
1923/// neighbours, and the in-progress match's labels.
1924#[derive(prost_helpers::AnyPB)]
1925#[derive(Clone, PartialEq, ::prost::Message)]
1926pub struct MatchRecognizeDefine {
1927    #[prost(string, tag = "1")]
1928    pub symbol: ::prost::alloc::string::String,
1929    /// Predicate over the synthetic slot row: an InputRef(i) reads slots\[i\].
1930    #[prost(message, optional, tag = "2")]
1931    pub condition: ::core::option::Option<super::expr::ExprNode>,
1932    #[prost(message, repeated, tag = "3")]
1933    pub slots: ::prost::alloc::vec::Vec<MatchRecognizeDefineSlot>,
1934}
1935/// The AFTER MATCH SKIP clause: where the scan resumes after an emitted match.
1936#[derive(prost_helpers::AnyPB)]
1937#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1938pub struct MatchRecognizeAfterMatchSkip {
1939    #[prost(enumeration = "match_recognize_after_match_skip::Mode", tag = "1")]
1940    pub mode: i32,
1941    /// Target pattern variable, for TO_FIRST / TO_LAST only.
1942    #[prost(string, optional, tag = "2")]
1943    pub target: ::core::option::Option<::prost::alloc::string::String>,
1944}
1945/// Nested message and enum types in `MatchRecognizeAfterMatchSkip`.
1946pub mod match_recognize_after_match_skip {
1947    #[derive(prost_helpers::AnyPB)]
1948    #[derive(
1949        Clone,
1950        Copy,
1951        Debug,
1952        PartialEq,
1953        Eq,
1954        Hash,
1955        PartialOrd,
1956        Ord,
1957        ::prost::Enumeration
1958    )]
1959    #[repr(i32)]
1960    pub enum Mode {
1961        Unspecified = 0,
1962        /// Resume past the match's last row (the default).
1963        PastLastRow = 1,
1964        /// Resume at the row after the match's first row.
1965        ToNextRow = 2,
1966        /// Resume at the first / last row bound to `target` within the match.
1967        ToFirst = 3,
1968        ToLast = 4,
1969    }
1970    impl Mode {
1971        /// String value of the enum field names used in the ProtoBuf definition.
1972        ///
1973        /// The values are not transformed in any way and thus are considered stable
1974        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1975        pub fn as_str_name(&self) -> &'static str {
1976            match self {
1977                Self::Unspecified => "MODE_UNSPECIFIED",
1978                Self::PastLastRow => "MODE_PAST_LAST_ROW",
1979                Self::ToNextRow => "MODE_TO_NEXT_ROW",
1980                Self::ToFirst => "MODE_TO_FIRST",
1981                Self::ToLast => "MODE_TO_LAST",
1982            }
1983        }
1984        /// Creates an enum from field names used in the ProtoBuf definition.
1985        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1986            match value {
1987                "MODE_UNSPECIFIED" => Some(Self::Unspecified),
1988                "MODE_PAST_LAST_ROW" => Some(Self::PastLastRow),
1989                "MODE_TO_NEXT_ROW" => Some(Self::ToNextRow),
1990                "MODE_TO_FIRST" => Some(Self::ToFirst),
1991                "MODE_TO_LAST" => Some(Self::ToLast),
1992                _ => None,
1993            }
1994        }
1995    }
1996}
1997/// One input a DEFINE predicate reads.
1998#[derive(prost_helpers::AnyPB)]
1999#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2000pub struct MatchRecognizeDefineSlot {
2001    #[prost(enumeration = "match_recognize_define_slot::Kind", tag = "1")]
2002    pub kind: i32,
2003    #[prost(string, repeated, tag = "2")]
2004    pub vars: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2005    #[prost(uint32, tag = "3")]
2006    pub col_idx: u32,
2007    #[prost(uint32, tag = "4")]
2008    pub offset: u32,
2009}
2010/// Nested message and enum types in `MatchRecognizeDefineSlot`.
2011pub mod match_recognize_define_slot {
2012    #[derive(prost_helpers::AnyPB)]
2013    #[derive(
2014        Clone,
2015        Copy,
2016        Debug,
2017        PartialEq,
2018        Eq,
2019        Hash,
2020        PartialOrd,
2021        Ord,
2022        ::prost::Enumeration
2023    )]
2024    #[repr(i32)]
2025    pub enum Kind {
2026        Unspecified = 0,
2027        /// The candidate row's own column.
2028        SelfCol = 1,
2029        /// PREV(col, offset) / NEXT(col, offset): a physical-offset row's column.
2030        Prev = 2,
2031        Next = 3,
2032        /// FIRST(var.col) / LAST(var.col): RUNNING navigation — the first / last row of the match so
2033        /// far that belongs to `vars`. The candidate row belongs to `vars` whenever `vars` contains the
2034        /// variable being defined: its label is still tentative, so it is not yet among the match's
2035        /// labels, but the standard counts it (a `var.col` reference *is* RUNNING LAST of that column).
2036        RunningFirst = 4,
2037        RunningLast = 5,
2038    }
2039    impl Kind {
2040        /// String value of the enum field names used in the ProtoBuf definition.
2041        ///
2042        /// The values are not transformed in any way and thus are considered stable
2043        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2044        pub fn as_str_name(&self) -> &'static str {
2045            match self {
2046                Self::Unspecified => "KIND_UNSPECIFIED",
2047                Self::SelfCol => "KIND_SELF_COL",
2048                Self::Prev => "KIND_PREV",
2049                Self::Next => "KIND_NEXT",
2050                Self::RunningFirst => "KIND_RUNNING_FIRST",
2051                Self::RunningLast => "KIND_RUNNING_LAST",
2052            }
2053        }
2054        /// Creates an enum from field names used in the ProtoBuf definition.
2055        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2056            match value {
2057                "KIND_UNSPECIFIED" => Some(Self::Unspecified),
2058                "KIND_SELF_COL" => Some(Self::SelfCol),
2059                "KIND_PREV" => Some(Self::Prev),
2060                "KIND_NEXT" => Some(Self::Next),
2061                "KIND_RUNNING_FIRST" => Some(Self::RunningFirst),
2062                "KIND_RUNNING_LAST" => Some(Self::RunningLast),
2063                _ => None,
2064            }
2065        }
2066    }
2067}
2068/// One MEASURES item. The expression is evaluated over a synthetic per-match row whose i-th column is
2069/// produced by `slots\[i\]`; the executor materializes that row once the match and its per-row pattern
2070/// variable labels are known.
2071#[derive(prost_helpers::AnyPB)]
2072#[derive(Clone, PartialEq, ::prost::Message)]
2073pub struct MatchRecognizeMeasure {
2074    /// Expression over the synthetic row: an InputRef(i) reads slots\[i\].
2075    #[prost(message, optional, tag = "1")]
2076    pub expr: ::core::option::Option<super::expr::ExprNode>,
2077    #[prost(string, tag = "2")]
2078    pub name: ::prost::alloc::string::String,
2079    #[prost(message, repeated, tag = "3")]
2080    pub slots: ::prost::alloc::vec::Vec<MatchRecognizeMeasureSlot>,
2081}
2082/// One navigation input of a measure expression.
2083#[derive(prost_helpers::AnyPB)]
2084#[derive(Clone, PartialEq, ::prost::Message)]
2085pub struct MatchRecognizeMeasureSlot {
2086    #[prost(enumeration = "match_recognize_measure_slot::Kind", tag = "1")]
2087    pub kind: i32,
2088    /// The pattern variables this slot navigates over: one for a plain variable, several for a SUBSET
2089    /// union variable. Empty for CLASSIFIER. A row matches if its label is any of these.
2090    #[prost(string, repeated, tag = "2")]
2091    pub vars: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2092    #[prost(uint32, tag = "3")]
2093    pub col_idx: u32,
2094    #[prost(message, optional, tag = "4")]
2095    pub data_type: ::core::option::Option<super::data::DataType>,
2096    /// The aggregate to run for KIND_SUM, over a single input column (the projected `col_idx`) of
2097    /// the rows labeled by `vars`. Its single arg is an InputRef to column 0.
2098    #[prost(message, optional, tag = "5")]
2099    pub agg_call: ::core::option::Option<super::expr::AggCall>,
2100}
2101/// Nested message and enum types in `MatchRecognizeMeasureSlot`.
2102pub mod match_recognize_measure_slot {
2103    #[derive(prost_helpers::AnyPB)]
2104    #[derive(
2105        Clone,
2106        Copy,
2107        Debug,
2108        PartialEq,
2109        Eq,
2110        Hash,
2111        PartialOrd,
2112        Ord,
2113        ::prost::Enumeration
2114    )]
2115    #[repr(i32)]
2116    pub enum Kind {
2117        Unspecified = 0,
2118        /// LAST(var.col): column value of the last row labeled `var` in the match (also the meaning of
2119        /// a bare `var.col` under ONE ROW PER MATCH FINAL semantics).
2120        Last = 1,
2121        /// FIRST(var.col): column value of the first such row.
2122        First = 2,
2123        /// CLASSIFIER(): the pattern variable bound to the match's last row (`var`/`col_idx` unused).
2124        Classifier = 3,
2125        /// COUNT(\*): number of rows in the match (`var`/`col_idx` unused).
2126        CountStar = 4,
2127        /// COUNT(var.col): number of rows labeled `var` whose `col` is non-null.
2128        Count = 5,
2129        /// MIN(var.col) / MAX(var.col): min / max of `col` over rows labeled `var`.
2130        Min = 6,
2131        Max = 7,
2132        /// SUM(var.col): evaluated by `agg_call` over the rows labeled `var`. (AVG is lowered by the
2133        /// planner into a SUM slot plus a COUNT slot and a division expression.)
2134        Sum = 8,
2135    }
2136    impl Kind {
2137        /// String value of the enum field names used in the ProtoBuf definition.
2138        ///
2139        /// The values are not transformed in any way and thus are considered stable
2140        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2141        pub fn as_str_name(&self) -> &'static str {
2142            match self {
2143                Self::Unspecified => "KIND_UNSPECIFIED",
2144                Self::Last => "KIND_LAST",
2145                Self::First => "KIND_FIRST",
2146                Self::Classifier => "KIND_CLASSIFIER",
2147                Self::CountStar => "KIND_COUNT_STAR",
2148                Self::Count => "KIND_COUNT",
2149                Self::Min => "KIND_MIN",
2150                Self::Max => "KIND_MAX",
2151                Self::Sum => "KIND_SUM",
2152            }
2153        }
2154        /// Creates an enum from field names used in the ProtoBuf definition.
2155        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2156            match value {
2157                "KIND_UNSPECIFIED" => Some(Self::Unspecified),
2158                "KIND_LAST" => Some(Self::Last),
2159                "KIND_FIRST" => Some(Self::First),
2160                "KIND_CLASSIFIER" => Some(Self::Classifier),
2161                "KIND_COUNT_STAR" => Some(Self::CountStar),
2162                "KIND_COUNT" => Some(Self::Count),
2163                "KIND_MIN" => Some(Self::Min),
2164                "KIND_MAX" => Some(Self::Max),
2165                "KIND_SUM" => Some(Self::Sum),
2166                _ => None,
2167            }
2168        }
2169    }
2170}
2171#[derive(prost_helpers::AnyPB)]
2172#[derive(Clone, PartialEq, ::prost::Message)]
2173pub struct StreamNode {
2174    /// The id for the operator. This is local per mview.
2175    /// TODO: should better be a uint32.
2176    #[prost(uint64, tag = "1", wrapper = "crate::id::StreamNodeLocalOperatorId")]
2177    pub operator_id: crate::id::StreamNodeLocalOperatorId,
2178    /// Child node in plan aka. upstream nodes in the streaming DAG
2179    #[prost(message, repeated, tag = "3")]
2180    pub input: ::prost::alloc::vec::Vec<StreamNode>,
2181    #[prost(uint32, repeated, tag = "2")]
2182    pub stream_key: ::prost::alloc::vec::Vec<u32>,
2183    #[prost(enumeration = "stream_node::StreamKind", tag = "24")]
2184    pub stream_kind: i32,
2185    #[prost(string, tag = "18")]
2186    pub identity: ::prost::alloc::string::String,
2187    /// The schema of the plan node
2188    #[prost(message, repeated, tag = "19")]
2189    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
2190    #[prost(
2191        oneof = "stream_node::NodeBody",
2192        tags = "100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159"
2193    )]
2194    pub node_body: ::core::option::Option<stream_node::NodeBody>,
2195}
2196/// Nested message and enum types in `StreamNode`.
2197pub mod stream_node {
2198    /// This field used to be a `bool append_only`.
2199    /// Enum variants are ordered for backwards compatibility.
2200    #[derive(prost_helpers::AnyPB)]
2201    #[derive(
2202        Clone,
2203        Copy,
2204        Debug,
2205        PartialEq,
2206        Eq,
2207        Hash,
2208        PartialOrd,
2209        Ord,
2210        ::prost::Enumeration
2211    )]
2212    #[repr(i32)]
2213    pub enum StreamKind {
2214        /// buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
2215        Retract = 0,
2216        AppendOnly = 1,
2217        Upsert = 2,
2218    }
2219    impl StreamKind {
2220        /// String value of the enum field names used in the ProtoBuf definition.
2221        ///
2222        /// The values are not transformed in any way and thus are considered stable
2223        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2224        pub fn as_str_name(&self) -> &'static str {
2225            match self {
2226                Self::Retract => "STREAM_KIND_RETRACT",
2227                Self::AppendOnly => "STREAM_KIND_APPEND_ONLY",
2228                Self::Upsert => "STREAM_KIND_UPSERT",
2229            }
2230        }
2231        /// Creates an enum from field names used in the ProtoBuf definition.
2232        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2233            match value {
2234                "STREAM_KIND_RETRACT" => Some(Self::Retract),
2235                "STREAM_KIND_APPEND_ONLY" => Some(Self::AppendOnly),
2236                "STREAM_KIND_UPSERT" => Some(Self::Upsert),
2237                _ => None,
2238            }
2239        }
2240    }
2241    #[derive(prost_helpers::AnyPB)]
2242    #[derive(::enum_as_inner::EnumAsInner, ::strum::Display, ::strum::EnumDiscriminants)]
2243    #[derive(::prost_helpers::StreamNodeBodyVariants)]
2244    #[strum_discriminants(derive(::strum::Display, Hash))]
2245    #[derive(Clone, PartialEq, ::prost::Oneof)]
2246    pub enum NodeBody {
2247        #[prost(message, tag = "100")]
2248        Source(::prost::alloc::boxed::Box<super::SourceNode>),
2249        #[prost(message, tag = "101")]
2250        Project(::prost::alloc::boxed::Box<super::ProjectNode>),
2251        #[prost(message, tag = "102")]
2252        Filter(::prost::alloc::boxed::Box<super::FilterNode>),
2253        #[prost(message, tag = "103")]
2254        Materialize(::prost::alloc::boxed::Box<super::MaterializeNode>),
2255        #[prost(message, tag = "104")]
2256        StatelessSimpleAgg(::prost::alloc::boxed::Box<super::SimpleAggNode>),
2257        #[prost(message, tag = "105")]
2258        SimpleAgg(::prost::alloc::boxed::Box<super::SimpleAggNode>),
2259        #[prost(message, tag = "106")]
2260        HashAgg(::prost::alloc::boxed::Box<super::HashAggNode>),
2261        #[prost(message, tag = "107")]
2262        AppendOnlyTopN(::prost::alloc::boxed::Box<super::TopNNode>),
2263        #[prost(message, tag = "108")]
2264        HashJoin(::prost::alloc::boxed::Box<super::HashJoinNode>),
2265        #[prost(message, tag = "109")]
2266        TopN(::prost::alloc::boxed::Box<super::TopNNode>),
2267        #[prost(message, tag = "110")]
2268        HopWindow(::prost::alloc::boxed::Box<super::HopWindowNode>),
2269        #[prost(message, tag = "111")]
2270        Merge(::prost::alloc::boxed::Box<super::MergeNode>),
2271        #[prost(message, tag = "112")]
2272        Exchange(::prost::alloc::boxed::Box<super::ExchangeNode>),
2273        #[prost(message, tag = "113")]
2274        StreamScan(::prost::alloc::boxed::Box<super::StreamScanNode>),
2275        #[prost(message, tag = "114")]
2276        BatchPlan(::prost::alloc::boxed::Box<super::BatchPlanNode>),
2277        #[prost(message, tag = "115")]
2278        Lookup(::prost::alloc::boxed::Box<super::LookupNode>),
2279        #[prost(message, tag = "116")]
2280        Arrange(::prost::alloc::boxed::Box<super::ArrangeNode>),
2281        #[prost(message, tag = "117")]
2282        LookupUnion(::prost::alloc::boxed::Box<super::LookupUnionNode>),
2283        #[prost(message, tag = "118")]
2284        Union(super::UnionNode),
2285        #[prost(message, tag = "119")]
2286        DeltaIndexJoin(::prost::alloc::boxed::Box<super::DeltaIndexJoinNode>),
2287        #[prost(message, tag = "120")]
2288        Sink(::prost::alloc::boxed::Box<super::SinkNode>),
2289        #[prost(message, tag = "121")]
2290        Expand(::prost::alloc::boxed::Box<super::ExpandNode>),
2291        #[prost(message, tag = "122")]
2292        DynamicFilter(::prost::alloc::boxed::Box<super::DynamicFilterNode>),
2293        #[prost(message, tag = "123")]
2294        ProjectSet(::prost::alloc::boxed::Box<super::ProjectSetNode>),
2295        #[prost(message, tag = "124")]
2296        GroupTopN(::prost::alloc::boxed::Box<super::GroupTopNNode>),
2297        #[prost(message, tag = "125")]
2298        Sort(::prost::alloc::boxed::Box<super::SortNode>),
2299        #[prost(message, tag = "126")]
2300        WatermarkFilter(::prost::alloc::boxed::Box<super::WatermarkFilterNode>),
2301        #[prost(message, tag = "127")]
2302        Dml(::prost::alloc::boxed::Box<super::DmlNode>),
2303        #[prost(message, tag = "128")]
2304        RowIdGen(::prost::alloc::boxed::Box<super::RowIdGenNode>),
2305        #[prost(message, tag = "129")]
2306        Now(::prost::alloc::boxed::Box<super::NowNode>),
2307        #[prost(message, tag = "130")]
2308        AppendOnlyGroupTopN(::prost::alloc::boxed::Box<super::GroupTopNNode>),
2309        #[prost(message, tag = "131")]
2310        TemporalJoin(::prost::alloc::boxed::Box<super::TemporalJoinNode>),
2311        #[prost(message, tag = "132")]
2312        BarrierRecv(::prost::alloc::boxed::Box<super::BarrierRecvNode>),
2313        #[prost(message, tag = "133")]
2314        Values(::prost::alloc::boxed::Box<super::ValuesNode>),
2315        #[prost(message, tag = "134")]
2316        AppendOnlyDedup(::prost::alloc::boxed::Box<super::DedupNode>),
2317        #[prost(message, tag = "135")]
2318        NoOp(super::NoOpNode),
2319        #[prost(message, tag = "136")]
2320        EowcOverWindow(::prost::alloc::boxed::Box<super::EowcOverWindowNode>),
2321        #[prost(message, tag = "137")]
2322        OverWindow(::prost::alloc::boxed::Box<super::OverWindowNode>),
2323        #[prost(message, tag = "138")]
2324        StreamFsFetch(::prost::alloc::boxed::Box<super::StreamFsFetchNode>),
2325        #[prost(message, tag = "139")]
2326        StreamCdcScan(::prost::alloc::boxed::Box<super::StreamCdcScanNode>),
2327        #[prost(message, tag = "140")]
2328        CdcFilter(::prost::alloc::boxed::Box<super::CdcFilterNode>),
2329        #[prost(message, tag = "142")]
2330        SourceBackfill(::prost::alloc::boxed::Box<super::SourceBackfillNode>),
2331        #[prost(message, tag = "143")]
2332        Changelog(::prost::alloc::boxed::Box<super::ChangeLogNode>),
2333        #[prost(message, tag = "144")]
2334        LocalApproxPercentile(
2335            ::prost::alloc::boxed::Box<super::LocalApproxPercentileNode>,
2336        ),
2337        #[prost(message, tag = "145")]
2338        GlobalApproxPercentile(
2339            ::prost::alloc::boxed::Box<super::GlobalApproxPercentileNode>,
2340        ),
2341        #[prost(message, tag = "146")]
2342        RowMerge(::prost::alloc::boxed::Box<super::RowMergeNode>),
2343        #[prost(message, tag = "147")]
2344        AsOfJoin(::prost::alloc::boxed::Box<super::AsOfJoinNode>),
2345        #[prost(message, tag = "148")]
2346        SyncLogStore(::prost::alloc::boxed::Box<super::SyncLogStoreNode>),
2347        #[prost(message, tag = "149")]
2348        MaterializedExprs(::prost::alloc::boxed::Box<super::MaterializedExprsNode>),
2349        #[prost(message, tag = "150")]
2350        VectorIndexWrite(::prost::alloc::boxed::Box<super::VectorIndexWriteNode>),
2351        #[prost(message, tag = "151")]
2352        UpstreamSinkUnion(::prost::alloc::boxed::Box<super::UpstreamSinkUnionNode>),
2353        #[prost(message, tag = "152")]
2354        LocalityProvider(::prost::alloc::boxed::Box<super::LocalityProviderNode>),
2355        #[prost(message, tag = "153")]
2356        EowcGapFill(::prost::alloc::boxed::Box<super::EowcGapFillNode>),
2357        #[prost(message, tag = "154")]
2358        GapFill(::prost::alloc::boxed::Box<super::GapFillNode>),
2359        #[prost(message, tag = "155")]
2360        VectorIndexLookupJoin(
2361            ::prost::alloc::boxed::Box<super::VectorIndexLookupJoinNode>,
2362        ),
2363        #[prost(message, tag = "156")]
2364        IcebergWithPkIndexWriter(
2365            ::prost::alloc::boxed::Box<super::IcebergWithPkIndexWriterNode>,
2366        ),
2367        #[prost(message, tag = "157")]
2368        IcebergWithPkIndexPositionDeleteMerger(
2369            ::prost::alloc::boxed::Box<super::IcebergWithPkIndexPositionDeleteMergerNode>,
2370        ),
2371        #[prost(message, tag = "158")]
2372        MatchRecognize(::prost::alloc::boxed::Box<super::MatchRecognizeNode>),
2373        #[prost(message, tag = "159")]
2374        CompactionResolver(::prost::alloc::boxed::Box<super::CompactionResolverNode>),
2375    }
2376}
2377/// The method to map the upstream columns in the dispatcher before dispatching.
2378///
2379/// * For intra-job exchange, typically the upstream and downstream columns are the same. `indices`
2380///   will be `0..len` and `types` will be empty.
2381///
2382/// * For inter-job exchange,
2383///
2384///   * if the downstream only requires a subset of the upstream columns, `indices` will be the
2385///     indices of the required columns in the upstream columns.
2386///   * if some columns are added to the upstream, `indices` will help to maintain the same schema
2387///     from the view of the downstream.
2388///   * if some columns are altered to different (composite) types, `types` will be used to convert
2389///     the upstream columns to the downstream columns to maintain the same schema.
2390#[derive(prost_helpers::AnyPB)]
2391#[derive(Clone, PartialEq, ::prost::Message)]
2392pub struct DispatchOutputMapping {
2393    /// Indices of the columns to output.
2394    #[prost(uint32, repeated, tag = "1")]
2395    pub indices: ::prost::alloc::vec::Vec<u32>,
2396    /// Besides the indices, we may also need to convert the types of some columns.
2397    ///
2398    /// * If no type conversion is needed, this field will be empty.
2399    /// * If type conversion is needed, this will have the same length as `indices`. Only columns with
2400    ///   type conversion will have `upstream` and `downstream` field set.
2401    #[prost(message, repeated, tag = "2")]
2402    pub types: ::prost::alloc::vec::Vec<dispatch_output_mapping::TypePair>,
2403}
2404/// Nested message and enum types in `DispatchOutputMapping`.
2405pub mod dispatch_output_mapping {
2406    #[derive(prost_helpers::AnyPB)]
2407    #[derive(Clone, PartialEq, ::prost::Message)]
2408    pub struct TypePair {
2409        #[prost(message, optional, tag = "1")]
2410        pub upstream: ::core::option::Option<super::super::data::DataType>,
2411        #[prost(message, optional, tag = "2")]
2412        pub downstream: ::core::option::Option<super::super::data::DataType>,
2413    }
2414}
2415/// The property of an edge in the fragment graph.
2416/// This is essientially a "logical" version of `Dispatcher`. See the doc of `Dispatcher` for more details.
2417#[derive(prost_helpers::AnyPB)]
2418#[derive(Clone, PartialEq, ::prost::Message)]
2419pub struct DispatchStrategy {
2420    #[prost(enumeration = "DispatcherType", tag = "1")]
2421    pub r#type: i32,
2422    #[prost(uint32, repeated, tag = "2")]
2423    pub dist_key_indices: ::prost::alloc::vec::Vec<u32>,
2424    #[prost(message, optional, tag = "3")]
2425    pub output_mapping: ::core::option::Option<DispatchOutputMapping>,
2426}
2427/// A dispatcher redistribute messages.
2428/// We encode both the type and other usage information in the proto.
2429#[derive(prost_helpers::AnyPB)]
2430#[derive(Clone, PartialEq, ::prost::Message)]
2431pub struct Dispatcher {
2432    #[prost(enumeration = "DispatcherType", tag = "1")]
2433    pub r#type: i32,
2434    /// Indices of the columns to be used for hashing.
2435    /// For dispatcher types other than HASH, this is ignored.
2436    #[prost(uint32, repeated, tag = "2")]
2437    pub dist_key_indices: ::prost::alloc::vec::Vec<u32>,
2438    /// The method to map the upstream columns in the dispatcher before dispatching.
2439    #[prost(message, optional, tag = "6")]
2440    pub output_mapping: ::core::option::Option<DispatchOutputMapping>,
2441    /// The hash mapping for consistent hash.
2442    /// For dispatcher types other than HASH, this is ignored.
2443    #[prost(message, optional, tag = "3")]
2444    pub hash_mapping: ::core::option::Option<ActorMapping>,
2445    /// Dispatcher can be uniquely identified by a combination of actor id and dispatcher id.
2446    /// This is exactly the same as its downstream fragment id.
2447    #[prost(uint32, tag = "4", wrapper = "crate::id::FragmentId")]
2448    pub dispatcher_id: crate::id::FragmentId,
2449    /// Number of downstreams decides how many endpoints a dispatcher should dispatch.
2450    #[prost(uint32, repeated, tag = "5", wrapper = "crate::id::ActorId")]
2451    pub downstream_actor_id: ::prost::alloc::vec::Vec<crate::id::ActorId>,
2452}
2453/// A StreamActor is a running fragment of the overall stream graph,
2454#[derive(prost_helpers::AnyPB)]
2455#[derive(Clone, PartialEq, ::prost::Message)]
2456pub struct StreamActor {
2457    #[prost(uint32, tag = "1", wrapper = "crate::id::ActorId")]
2458    pub actor_id: crate::id::ActorId,
2459    #[prost(uint32, tag = "2", wrapper = "crate::id::FragmentId")]
2460    pub fragment_id: crate::id::FragmentId,
2461    #[prost(message, repeated, tag = "4")]
2462    pub dispatcher: ::prost::alloc::vec::Vec<Dispatcher>,
2463    /// Vnodes that the executors in this actor own.
2464    /// If the fragment is a singleton, this field will not be set and leave a `None`.
2465    #[prost(message, optional, tag = "8")]
2466    pub vnode_bitmap: ::core::option::Option<super::common::Buffer>,
2467    /// The SQL definition of this materialized view. Used for debugging only.
2468    #[prost(string, tag = "9")]
2469    pub mview_definition: ::prost::alloc::string::String,
2470    /// Provide the necessary context, e.g. session info like time zone, for the actor.
2471    #[prost(message, optional, tag = "10")]
2472    pub expr_context: ::core::option::Option<super::plan_common::ExprContext>,
2473    /// The config override for this actor.
2474    #[prost(string, tag = "11")]
2475    pub config_override: ::prost::alloc::string::String,
2476}
2477/// The streaming context associated with a stream plan
2478#[derive(prost_helpers::AnyPB)]
2479#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2480pub struct StreamContext {
2481    /// The timezone associated with the streaming plan. Only applies to MV for now.
2482    #[prost(string, tag = "1")]
2483    pub timezone: ::prost::alloc::string::String,
2484    /// The partial config of this job to override the global config.
2485    #[prost(string, tag = "2")]
2486    pub config_override: ::prost::alloc::string::String,
2487}
2488#[derive(prost_helpers::AnyPB)]
2489#[derive(Clone, PartialEq, ::prost::Message)]
2490pub struct BackfillOrder {
2491    #[prost(map = "uint32, message", tag = "1", wrapper = "crate::id::RelationId")]
2492    pub order: ::std::collections::HashMap<
2493        crate::id::RelationId,
2494        super::common::Uint32Vector,
2495    >,
2496}
2497/// Representation of a graph of stream fragments.
2498/// Generated by the fragmenter in the frontend, only used in DDL requests and never persisted.
2499///
2500/// For the persisted form, see `TableFragments`.
2501#[derive(prost_helpers::AnyPB)]
2502#[derive(Clone, PartialEq, ::prost::Message)]
2503pub struct StreamFragmentGraph {
2504    /// all the fragments in the graph.
2505    #[prost(map = "uint32, message", tag = "1", wrapper = "crate::id::FragmentId")]
2506    pub fragments: ::std::collections::HashMap<
2507        crate::id::FragmentId,
2508        stream_fragment_graph::StreamFragment,
2509    >,
2510    /// edges between fragments.
2511    #[prost(message, repeated, tag = "2")]
2512    pub edges: ::prost::alloc::vec::Vec<stream_fragment_graph::StreamFragmentEdge>,
2513    #[prost(uint32, repeated, tag = "3", wrapper = "crate::id::TableId")]
2514    pub dependent_table_ids: ::prost::alloc::vec::Vec<crate::id::TableId>,
2515    #[prost(uint32, tag = "4")]
2516    pub table_ids_cnt: u32,
2517    #[prost(message, optional, tag = "5")]
2518    pub ctx: ::core::option::Option<StreamContext>,
2519    /// If none, default parallelism will be applied.
2520    #[prost(message, optional, tag = "6")]
2521    pub parallelism: ::core::option::Option<stream_fragment_graph::Parallelism>,
2522    /// Parallelism to use during backfill. Falls back to `parallelism` if unset.
2523    #[prost(message, optional, tag = "9")]
2524    pub backfill_parallelism: ::core::option::Option<stream_fragment_graph::Parallelism>,
2525    /// The adaptive parallelism strategy for this streaming job, if explicitly set.
2526    #[prost(string, tag = "10")]
2527    pub adaptive_parallelism_strategy: ::prost::alloc::string::String,
2528    /// The adaptive parallelism strategy for the backfill override, if explicitly set.
2529    #[prost(string, tag = "11")]
2530    pub backfill_adaptive_parallelism_strategy: ::prost::alloc::string::String,
2531    /// Specified max parallelism, i.e., expected vnode count for the graph.
2532    ///
2533    /// The scheduler on the meta service will use this as a hint to decide the vnode count
2534    /// for each fragment.
2535    ///
2536    /// Note that the actual vnode count may be different from this value.
2537    /// For example, a no-shuffle exchange between current fragment graph and an existing
2538    /// upstream fragment graph requires two fragments to be in the same distribution,
2539    /// thus the same vnode count.
2540    #[prost(uint32, tag = "7")]
2541    pub max_parallelism: u32,
2542    /// The backfill order strategy for the fragments.
2543    #[prost(message, optional, tag = "8")]
2544    pub backfill_order: ::core::option::Option<BackfillOrder>,
2545}
2546/// Nested message and enum types in `StreamFragmentGraph`.
2547pub mod stream_fragment_graph {
2548    #[derive(prost_helpers::AnyPB)]
2549    #[derive(Clone, PartialEq, ::prost::Message)]
2550    pub struct StreamFragment {
2551        /// 0-based on frontend, and will be rewritten to global id on meta.
2552        #[prost(uint32, tag = "1", wrapper = "crate::id::FragmentId")]
2553        pub fragment_id: crate::id::FragmentId,
2554        /// root stream node in this fragment.
2555        #[prost(message, optional, tag = "2")]
2556        pub node: ::core::option::Option<super::StreamNode>,
2557        /// Bitwise-OR of `FragmentTypeFlag`s
2558        #[prost(uint32, tag = "3")]
2559        pub fragment_type_mask: u32,
2560        /// Mark whether this fragment requires exactly one actor.
2561        /// Note: if this is `false`, the fragment may still be a singleton according to the scheduler.
2562        /// One should check `meta.Fragment.distribution_type` for the final result.
2563        #[prost(bool, tag = "4")]
2564        pub requires_singleton: bool,
2565    }
2566    #[derive(prost_helpers::AnyPB)]
2567    #[derive(Clone, PartialEq, ::prost::Message)]
2568    pub struct StreamFragmentEdge {
2569        /// Dispatch strategy for the fragment.
2570        #[prost(message, optional, tag = "1")]
2571        pub dispatch_strategy: ::core::option::Option<super::DispatchStrategy>,
2572        /// A unique identifier of this edge. Generally it should be exchange node's operator id. When
2573        /// rewriting fragments into delta joins or when inserting 1-to-1 exchange, there will be
2574        /// virtual links generated.
2575        #[prost(uint64, tag = "3")]
2576        pub link_id: u64,
2577        #[prost(uint32, tag = "4", wrapper = "crate::id::FragmentId")]
2578        pub upstream_id: crate::id::FragmentId,
2579        #[prost(uint32, tag = "5", wrapper = "crate::id::FragmentId")]
2580        pub downstream_id: crate::id::FragmentId,
2581    }
2582    #[derive(prost_helpers::AnyPB)]
2583    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2584    pub struct Parallelism {
2585        #[prost(uint64, tag = "1")]
2586        pub parallelism: u64,
2587    }
2588}
2589/// Schema change operation for sink
2590#[derive(prost_helpers::AnyPB)]
2591#[derive(Clone, PartialEq, ::prost::Message)]
2592pub struct SinkSchemaChange {
2593    /// Original schema before this change.
2594    /// Used for validation and conflict detection.
2595    #[prost(message, repeated, tag = "1")]
2596    pub original_schema: ::prost::alloc::vec::Vec<super::plan_common::Field>,
2597    /// Schema change operation (mutually exclusive)
2598    #[prost(oneof = "sink_schema_change::Op", tags = "2, 3")]
2599    pub op: ::core::option::Option<sink_schema_change::Op>,
2600}
2601/// Nested message and enum types in `SinkSchemaChange`.
2602pub mod sink_schema_change {
2603    /// Schema change operation (mutually exclusive)
2604    #[derive(prost_helpers::AnyPB)]
2605    #[derive(Clone, PartialEq, ::prost::Oneof)]
2606    pub enum Op {
2607        /// Add new columns to the schema
2608        #[prost(message, tag = "2")]
2609        AddColumns(super::SinkAddColumnsOp),
2610        /// Drop columns from the schema
2611        #[prost(message, tag = "3")]
2612        DropColumns(super::SinkDropColumnsOp),
2613    }
2614}
2615/// Add columns operation
2616#[derive(prost_helpers::AnyPB)]
2617#[derive(Clone, PartialEq, ::prost::Message)]
2618pub struct SinkAddColumnsOp {
2619    /// Columns to add
2620    #[prost(message, repeated, tag = "1")]
2621    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
2622}
2623/// Drop columns operation
2624#[derive(prost_helpers::AnyPB)]
2625#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2626pub struct SinkDropColumnsOp {
2627    /// Column names to drop
2628    #[prost(string, repeated, tag = "1")]
2629    pub column_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2630}
2631#[derive(prost_helpers::AnyPB)]
2632#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2633#[repr(i32)]
2634pub enum SinkLogStoreType {
2635    /// / Default value is the normal in memory log store to be backward compatible with the previously unset value
2636    Unspecified = 0,
2637    KvLogStore = 1,
2638    InMemoryLogStore = 2,
2639}
2640impl SinkLogStoreType {
2641    /// String value of the enum field names used in the ProtoBuf definition.
2642    ///
2643    /// The values are not transformed in any way and thus are considered stable
2644    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2645    pub fn as_str_name(&self) -> &'static str {
2646        match self {
2647            Self::Unspecified => "SINK_LOG_STORE_TYPE_UNSPECIFIED",
2648            Self::KvLogStore => "SINK_LOG_STORE_TYPE_KV_LOG_STORE",
2649            Self::InMemoryLogStore => "SINK_LOG_STORE_TYPE_IN_MEMORY_LOG_STORE",
2650        }
2651    }
2652    /// Creates an enum from field names used in the ProtoBuf definition.
2653    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2654        match value {
2655            "SINK_LOG_STORE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2656            "SINK_LOG_STORE_TYPE_KV_LOG_STORE" => Some(Self::KvLogStore),
2657            "SINK_LOG_STORE_TYPE_IN_MEMORY_LOG_STORE" => Some(Self::InMemoryLogStore),
2658            _ => None,
2659        }
2660    }
2661}
2662#[derive(prost_helpers::AnyPB)]
2663#[derive(prost_helpers::Version)]
2664#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2665#[repr(i32)]
2666pub enum AggNodeVersion {
2667    Unspecified = 0,
2668    /// <https://github.com/risingwavelabs/risingwave/issues/12140#issuecomment-1776289808>
2669    Issue12140 = 1,
2670    /// <https://github.com/risingwavelabs/risingwave/issues/13465#issuecomment-1821016508>
2671    Issue13465 = 2,
2672}
2673impl AggNodeVersion {
2674    /// String value of the enum field names used in the ProtoBuf definition.
2675    ///
2676    /// The values are not transformed in any way and thus are considered stable
2677    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2678    pub fn as_str_name(&self) -> &'static str {
2679        match self {
2680            Self::Unspecified => "AGG_NODE_VERSION_UNSPECIFIED",
2681            Self::Issue12140 => "AGG_NODE_VERSION_ISSUE_12140",
2682            Self::Issue13465 => "AGG_NODE_VERSION_ISSUE_13465",
2683        }
2684    }
2685    /// Creates an enum from field names used in the ProtoBuf definition.
2686    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2687        match value {
2688            "AGG_NODE_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
2689            "AGG_NODE_VERSION_ISSUE_12140" => Some(Self::Issue12140),
2690            "AGG_NODE_VERSION_ISSUE_13465" => Some(Self::Issue13465),
2691            _ => None,
2692        }
2693    }
2694}
2695#[derive(prost_helpers::AnyPB)]
2696#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2697#[repr(i32)]
2698pub enum InequalityType {
2699    Unspecified = 0,
2700    LessThan = 1,
2701    LessThanOrEqual = 2,
2702    GreaterThan = 3,
2703    GreaterThanOrEqual = 4,
2704}
2705impl InequalityType {
2706    /// String value of the enum field names used in the ProtoBuf definition.
2707    ///
2708    /// The values are not transformed in any way and thus are considered stable
2709    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2710    pub fn as_str_name(&self) -> &'static str {
2711        match self {
2712            Self::Unspecified => "INEQUALITY_TYPE_UNSPECIFIED",
2713            Self::LessThan => "INEQUALITY_TYPE_LESS_THAN",
2714            Self::LessThanOrEqual => "INEQUALITY_TYPE_LESS_THAN_OR_EQUAL",
2715            Self::GreaterThan => "INEQUALITY_TYPE_GREATER_THAN",
2716            Self::GreaterThanOrEqual => "INEQUALITY_TYPE_GREATER_THAN_OR_EQUAL",
2717        }
2718    }
2719    /// Creates an enum from field names used in the ProtoBuf definition.
2720    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2721        match value {
2722            "INEQUALITY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2723            "INEQUALITY_TYPE_LESS_THAN" => Some(Self::LessThan),
2724            "INEQUALITY_TYPE_LESS_THAN_OR_EQUAL" => Some(Self::LessThanOrEqual),
2725            "INEQUALITY_TYPE_GREATER_THAN" => Some(Self::GreaterThan),
2726            "INEQUALITY_TYPE_GREATER_THAN_OR_EQUAL" => Some(Self::GreaterThanOrEqual),
2727            _ => None,
2728        }
2729    }
2730}
2731#[derive(prost_helpers::AnyPB)]
2732#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2733#[repr(i32)]
2734pub enum JoinEncodingType {
2735    Unspecified = 0,
2736    MemoryOptimized = 1,
2737    CpuOptimized = 2,
2738}
2739impl JoinEncodingType {
2740    /// String value of the enum field names used in the ProtoBuf definition.
2741    ///
2742    /// The values are not transformed in any way and thus are considered stable
2743    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2744    pub fn as_str_name(&self) -> &'static str {
2745        match self {
2746            Self::Unspecified => "UNSPECIFIED",
2747            Self::MemoryOptimized => "MEMORY_OPTIMIZED",
2748            Self::CpuOptimized => "CPU_OPTIMIZED",
2749        }
2750    }
2751    /// Creates an enum from field names used in the ProtoBuf definition.
2752    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2753        match value {
2754            "UNSPECIFIED" => Some(Self::Unspecified),
2755            "MEMORY_OPTIMIZED" => Some(Self::MemoryOptimized),
2756            "CPU_OPTIMIZED" => Some(Self::CpuOptimized),
2757            _ => None,
2758        }
2759    }
2760}
2761/// Decides which kind of Executor will be used
2762#[derive(prost_helpers::AnyPB)]
2763#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2764#[repr(i32)]
2765pub enum StreamScanType {
2766    Unspecified = 0,
2767    /// ChainExecutor. Deprecated: only for existing persisted legacy jobs.
2768    #[deprecated]
2769    Chain = 1,
2770    /// RearrangedChainExecutor. Deprecated: only for existing persisted legacy jobs.
2771    #[deprecated]
2772    Rearrange = 2,
2773    /// BackfillExecutor. Deprecated: only for existing persisted legacy jobs.
2774    #[deprecated]
2775    Backfill = 3,
2776    /// ChainExecutor with upstream_only = true
2777    UpstreamOnly = 4,
2778    /// ArrangementBackfillExecutor
2779    ArrangementBackfill = 5,
2780    /// SnapshotBackfillExecutor
2781    SnapshotBackfill = 6,
2782    /// SnapshotBackfillExecutor
2783    CrossDbSnapshotBackfill = 7,
2784}
2785impl StreamScanType {
2786    /// String value of the enum field names used in the ProtoBuf definition.
2787    ///
2788    /// The values are not transformed in any way and thus are considered stable
2789    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2790    pub fn as_str_name(&self) -> &'static str {
2791        match self {
2792            Self::Unspecified => "STREAM_SCAN_TYPE_UNSPECIFIED",
2793            #[allow(deprecated)]
2794            Self::Chain => "STREAM_SCAN_TYPE_CHAIN",
2795            #[allow(deprecated)]
2796            Self::Rearrange => "STREAM_SCAN_TYPE_REARRANGE",
2797            #[allow(deprecated)]
2798            Self::Backfill => "STREAM_SCAN_TYPE_BACKFILL",
2799            Self::UpstreamOnly => "STREAM_SCAN_TYPE_UPSTREAM_ONLY",
2800            Self::ArrangementBackfill => "STREAM_SCAN_TYPE_ARRANGEMENT_BACKFILL",
2801            Self::SnapshotBackfill => "STREAM_SCAN_TYPE_SNAPSHOT_BACKFILL",
2802            Self::CrossDbSnapshotBackfill => {
2803                "STREAM_SCAN_TYPE_CROSS_DB_SNAPSHOT_BACKFILL"
2804            }
2805        }
2806    }
2807    /// Creates an enum from field names used in the ProtoBuf definition.
2808    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2809        match value {
2810            "STREAM_SCAN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2811            "STREAM_SCAN_TYPE_CHAIN" => Some(#[allow(deprecated)] Self::Chain),
2812            "STREAM_SCAN_TYPE_REARRANGE" => Some(#[allow(deprecated)] Self::Rearrange),
2813            "STREAM_SCAN_TYPE_BACKFILL" => Some(#[allow(deprecated)] Self::Backfill),
2814            "STREAM_SCAN_TYPE_UPSTREAM_ONLY" => Some(Self::UpstreamOnly),
2815            "STREAM_SCAN_TYPE_ARRANGEMENT_BACKFILL" => Some(Self::ArrangementBackfill),
2816            "STREAM_SCAN_TYPE_SNAPSHOT_BACKFILL" => Some(Self::SnapshotBackfill),
2817            "STREAM_SCAN_TYPE_CROSS_DB_SNAPSHOT_BACKFILL" => {
2818                Some(Self::CrossDbSnapshotBackfill)
2819            }
2820            _ => None,
2821        }
2822    }
2823}
2824#[derive(prost_helpers::AnyPB)]
2825#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2826#[repr(i32)]
2827pub enum OverWindowCachePolicy {
2828    Unspecified = 0,
2829    Full = 1,
2830    Recent = 2,
2831    RecentFirstN = 3,
2832    RecentLastN = 4,
2833}
2834impl OverWindowCachePolicy {
2835    /// String value of the enum field names used in the ProtoBuf definition.
2836    ///
2837    /// The values are not transformed in any way and thus are considered stable
2838    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2839    pub fn as_str_name(&self) -> &'static str {
2840        match self {
2841            Self::Unspecified => "OVER_WINDOW_CACHE_POLICY_UNSPECIFIED",
2842            Self::Full => "OVER_WINDOW_CACHE_POLICY_FULL",
2843            Self::Recent => "OVER_WINDOW_CACHE_POLICY_RECENT",
2844            Self::RecentFirstN => "OVER_WINDOW_CACHE_POLICY_RECENT_FIRST_N",
2845            Self::RecentLastN => "OVER_WINDOW_CACHE_POLICY_RECENT_LAST_N",
2846        }
2847    }
2848    /// Creates an enum from field names used in the ProtoBuf definition.
2849    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2850        match value {
2851            "OVER_WINDOW_CACHE_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
2852            "OVER_WINDOW_CACHE_POLICY_FULL" => Some(Self::Full),
2853            "OVER_WINDOW_CACHE_POLICY_RECENT" => Some(Self::Recent),
2854            "OVER_WINDOW_CACHE_POLICY_RECENT_FIRST_N" => Some(Self::RecentFirstN),
2855            "OVER_WINDOW_CACHE_POLICY_RECENT_LAST_N" => Some(Self::RecentLastN),
2856            _ => None,
2857        }
2858    }
2859}
2860#[derive(prost_helpers::AnyPB)]
2861#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2862#[repr(i32)]
2863pub enum MatchRecognizeInputMode {
2864    Unspecified = 0,
2865    EventTime = 1,
2866    ProcessingTime = 2,
2867}
2868impl MatchRecognizeInputMode {
2869    /// String value of the enum field names used in the ProtoBuf definition.
2870    ///
2871    /// The values are not transformed in any way and thus are considered stable
2872    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2873    pub fn as_str_name(&self) -> &'static str {
2874        match self {
2875            Self::Unspecified => "MATCH_RECOGNIZE_INPUT_MODE_UNSPECIFIED",
2876            Self::EventTime => "MATCH_RECOGNIZE_INPUT_MODE_EVENT_TIME",
2877            Self::ProcessingTime => "MATCH_RECOGNIZE_INPUT_MODE_PROCESSING_TIME",
2878        }
2879    }
2880    /// Creates an enum from field names used in the ProtoBuf definition.
2881    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2882        match value {
2883            "MATCH_RECOGNIZE_INPUT_MODE_UNSPECIFIED" => Some(Self::Unspecified),
2884            "MATCH_RECOGNIZE_INPUT_MODE_EVENT_TIME" => Some(Self::EventTime),
2885            "MATCH_RECOGNIZE_INPUT_MODE_PROCESSING_TIME" => Some(Self::ProcessingTime),
2886            _ => None,
2887        }
2888    }
2889}
2890#[derive(prost_helpers::AnyPB)]
2891#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2892#[repr(i32)]
2893pub enum DispatcherType {
2894    Unspecified = 0,
2895    /// Dispatch by hash key, hashed by consistent hash.
2896    Hash = 1,
2897    /// Broadcast to all downstreams.
2898    ///
2899    /// Note a broadcast cannot be represented as multiple simple dispatchers, since they are
2900    /// different when we update dispatchers during scaling.
2901    Broadcast = 2,
2902    /// Only one downstream.
2903    Simple = 3,
2904    /// A special kind of exchange that doesn't involve shuffle. The upstream actor will be directly
2905    /// piped into the downstream actor, if there are the same number of actors. If number of actors
2906    /// are not the same, should use hash instead. Should be only used when distribution is the same.
2907    NoShuffle = 4,
2908}
2909impl DispatcherType {
2910    /// String value of the enum field names used in the ProtoBuf definition.
2911    ///
2912    /// The values are not transformed in any way and thus are considered stable
2913    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2914    pub fn as_str_name(&self) -> &'static str {
2915        match self {
2916            Self::Unspecified => "DISPATCHER_TYPE_UNSPECIFIED",
2917            Self::Hash => "DISPATCHER_TYPE_HASH",
2918            Self::Broadcast => "DISPATCHER_TYPE_BROADCAST",
2919            Self::Simple => "DISPATCHER_TYPE_SIMPLE",
2920            Self::NoShuffle => "DISPATCHER_TYPE_NO_SHUFFLE",
2921        }
2922    }
2923    /// Creates an enum from field names used in the ProtoBuf definition.
2924    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2925        match value {
2926            "DISPATCHER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2927            "DISPATCHER_TYPE_HASH" => Some(Self::Hash),
2928            "DISPATCHER_TYPE_BROADCAST" => Some(Self::Broadcast),
2929            "DISPATCHER_TYPE_SIMPLE" => Some(Self::Simple),
2930            "DISPATCHER_TYPE_NO_SHUFFLE" => Some(Self::NoShuffle),
2931            _ => None,
2932        }
2933    }
2934}