Skip to main content

risingwave_pb/
stream_plan.rs

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