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