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