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