Skip to main content

risingwave_pb/
batch_plan.rs

1// This file is @generated by prost-build.
2#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct RowSeqScanNode {
5    #[prost(message, optional, tag = "1")]
6    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
7    #[prost(int32, repeated, tag = "2")]
8    pub column_ids: ::prost::alloc::vec::Vec<i32>,
9    /// All the ranges need to be read. i.e., they are OR'ed.
10    ///
11    /// Empty `scan_ranges` means full table scan.
12    #[prost(message, repeated, tag = "3")]
13    pub scan_ranges: ::prost::alloc::vec::Vec<ScanRange>,
14    /// The partition to read for scan tasks.
15    ///
16    /// Will be filled by the scheduler.
17    #[prost(message, optional, tag = "4")]
18    pub vnode_bitmap: ::core::option::Option<super::common::Buffer>,
19    /// Whether the order on output columns should be preserved.
20    #[prost(bool, tag = "5")]
21    pub ordered: bool,
22    /// The pushed down `batch_limit`. Max rows needed to return.
23    #[prost(uint64, optional, tag = "6")]
24    pub limit: ::core::option::Option<u64>,
25    #[prost(message, optional, tag = "7")]
26    pub query_epoch: ::core::option::Option<super::common::BatchQueryEpoch>,
27}
28#[derive(prost_helpers::AnyPB)]
29#[derive(Clone, PartialEq, ::prost::Message)]
30pub struct SysRowSeqScanNode {
31    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
32    pub table_id: crate::id::TableId,
33    #[prost(message, repeated, tag = "2")]
34    pub column_descs: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
35}
36/// The range to scan, which specifies a consecutive range of the PK
37/// and can represent: (Suppose there are N columns in the PK)
38///
39/// * full table scan: Should not occur. Use an empty `Vec<ScanRange>` instead.
40/// * index range scan: `eq_conds` includes i (between 0 and N-1, inclusive) values,
41///   and `lower_bound` & `upper_bound` is the range for the (i+1)th column
42/// * index point get: `eq_conds` includes N values, and `lower_bound` & `upper_bound` are `None`
43#[derive(prost_helpers::AnyPB)]
44#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
45pub struct ScanRange {
46    /// The i-th element represents the value of the i-th PK column.
47    #[prost(bytes = "vec", repeated, tag = "1")]
48    pub eq_conds: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
49    /// The lower bound of the next PK column subsequent to those in `eq_conds`.
50    #[prost(message, optional, tag = "2")]
51    pub lower_bound: ::core::option::Option<scan_range::Bound>,
52    /// The upper bound of the next PK column subsequent to those in `eq_conds`.
53    #[prost(message, optional, tag = "3")]
54    pub upper_bound: ::core::option::Option<scan_range::Bound>,
55}
56/// Nested message and enum types in `ScanRange`.
57pub mod scan_range {
58    /// `None` represent unbounded.
59    #[derive(prost_helpers::AnyPB)]
60    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
61    pub struct Bound {
62        #[prost(bytes = "vec", repeated, tag = "1")]
63        pub value: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
64        #[prost(bool, tag = "2")]
65        pub inclusive: bool,
66    }
67}
68#[derive(prost_helpers::AnyPB)]
69#[derive(Clone, PartialEq, ::prost::Message)]
70pub struct SourceNode {
71    #[prost(uint32, tag = "1", wrapper = "crate::id::SourceId")]
72    pub source_id: crate::id::SourceId,
73    #[prost(message, repeated, tag = "2")]
74    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
75    #[prost(btree_map = "string, string", tag = "3")]
76    pub with_properties: ::prost::alloc::collections::BTreeMap<
77        ::prost::alloc::string::String,
78        ::prost::alloc::string::String,
79    >,
80    #[prost(bytes = "vec", repeated, tag = "4")]
81    pub split: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
82    #[prost(message, optional, tag = "5")]
83    pub info: ::core::option::Option<super::catalog::StreamSourceInfo>,
84    #[prost(btree_map = "string, message", tag = "6")]
85    pub secret_refs: ::prost::alloc::collections::BTreeMap<
86        ::prost::alloc::string::String,
87        super::secret::SecretRef,
88    >,
89}
90#[derive(prost_helpers::AnyPB)]
91#[derive(Clone, PartialEq, ::prost::Message)]
92pub struct IcebergScanNode {
93    #[prost(message, repeated, tag = "1")]
94    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
95    #[prost(btree_map = "string, string", tag = "2")]
96    pub with_properties: ::prost::alloc::collections::BTreeMap<
97        ::prost::alloc::string::String,
98        ::prost::alloc::string::String,
99    >,
100    #[prost(bytes = "vec", repeated, tag = "3")]
101    pub split: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
102    #[prost(btree_map = "string, message", tag = "4")]
103    pub secret_refs: ::prost::alloc::collections::BTreeMap<
104        ::prost::alloc::string::String,
105        super::secret::SecretRef,
106    >,
107    #[prost(enumeration = "iceberg_scan_node::IcebergScanType", tag = "5")]
108    pub iceberg_scan_type: i32,
109}
110/// Nested message and enum types in `IcebergScanNode`.
111pub mod iceberg_scan_node {
112    #[derive(prost_helpers::AnyPB)]
113    #[derive(
114        Clone,
115        Copy,
116        Debug,
117        PartialEq,
118        Eq,
119        Hash,
120        PartialOrd,
121        Ord,
122        ::prost::Enumeration
123    )]
124    #[repr(i32)]
125    pub enum IcebergScanType {
126        Unspecified = 0,
127        DataScan = 1,
128        EqualityDeleteScan = 2,
129        PositionDeleteScan = 3,
130        #[deprecated]
131        CountStar = 4,
132    }
133    impl IcebergScanType {
134        /// String value of the enum field names used in the ProtoBuf definition.
135        ///
136        /// The values are not transformed in any way and thus are considered stable
137        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
138        pub fn as_str_name(&self) -> &'static str {
139            match self {
140                Self::Unspecified => "ICEBERG_SCAN_TYPE_UNSPECIFIED",
141                Self::DataScan => "ICEBERG_SCAN_TYPE_DATA_SCAN",
142                Self::EqualityDeleteScan => "ICEBERG_SCAN_TYPE_EQUALITY_DELETE_SCAN",
143                Self::PositionDeleteScan => "ICEBERG_SCAN_TYPE_POSITION_DELETE_SCAN",
144                #[allow(deprecated)]
145                Self::CountStar => "ICEBERG_SCAN_TYPE_COUNT_STAR",
146            }
147        }
148        /// Creates an enum from field names used in the ProtoBuf definition.
149        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
150            match value {
151                "ICEBERG_SCAN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
152                "ICEBERG_SCAN_TYPE_DATA_SCAN" => Some(Self::DataScan),
153                "ICEBERG_SCAN_TYPE_EQUALITY_DELETE_SCAN" => {
154                    Some(Self::EqualityDeleteScan)
155                }
156                "ICEBERG_SCAN_TYPE_POSITION_DELETE_SCAN" => {
157                    Some(Self::PositionDeleteScan)
158                }
159                "ICEBERG_SCAN_TYPE_COUNT_STAR" => {
160                    Some(#[allow(deprecated)] Self::CountStar)
161                }
162                _ => None,
163            }
164        }
165    }
166}
167#[derive(prost_helpers::AnyPB)]
168#[derive(Clone, PartialEq, ::prost::Message)]
169pub struct IcebergMetadataScanNode {
170    #[prost(btree_map = "string, string", tag = "1")]
171    pub with_properties: ::prost::alloc::collections::BTreeMap<
172        ::prost::alloc::string::String,
173        ::prost::alloc::string::String,
174    >,
175    #[prost(btree_map = "string, message", tag = "2")]
176    pub secret_refs: ::prost::alloc::collections::BTreeMap<
177        ::prost::alloc::string::String,
178        super::secret::SecretRef,
179    >,
180    #[prost(enumeration = "iceberg_metadata_scan_node::MetadataType", tag = "3")]
181    pub metadata_type: i32,
182    #[prost(oneof = "iceberg_metadata_scan_node::TimeTravel", tags = "4, 5")]
183    pub time_travel: ::core::option::Option<iceberg_metadata_scan_node::TimeTravel>,
184}
185/// Nested message and enum types in `IcebergMetadataScanNode`.
186pub mod iceberg_metadata_scan_node {
187    #[derive(prost_helpers::AnyPB)]
188    #[derive(
189        Clone,
190        Copy,
191        Debug,
192        PartialEq,
193        Eq,
194        Hash,
195        PartialOrd,
196        Ord,
197        ::prost::Enumeration
198    )]
199    #[repr(i32)]
200    pub enum MetadataType {
201        Unspecified = 0,
202        Snapshots = 1,
203        Manifests = 2,
204        Files = 3,
205    }
206    impl MetadataType {
207        /// String value of the enum field names used in the ProtoBuf definition.
208        ///
209        /// The values are not transformed in any way and thus are considered stable
210        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
211        pub fn as_str_name(&self) -> &'static str {
212            match self {
213                Self::Unspecified => "METADATA_TYPE_UNSPECIFIED",
214                Self::Snapshots => "METADATA_TYPE_SNAPSHOTS",
215                Self::Manifests => "METADATA_TYPE_MANIFESTS",
216                Self::Files => "METADATA_TYPE_FILES",
217            }
218        }
219        /// Creates an enum from field names used in the ProtoBuf definition.
220        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
221            match value {
222                "METADATA_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
223                "METADATA_TYPE_SNAPSHOTS" => Some(Self::Snapshots),
224                "METADATA_TYPE_MANIFESTS" => Some(Self::Manifests),
225                "METADATA_TYPE_FILES" => Some(Self::Files),
226                _ => None,
227            }
228        }
229    }
230    #[derive(prost_helpers::AnyPB)]
231    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
232    pub enum TimeTravel {
233        #[prost(int64, tag = "4")]
234        SnapshotId(i64),
235        #[prost(int64, tag = "5")]
236        TimestampMs(i64),
237    }
238}
239#[derive(prost_helpers::AnyPB)]
240#[derive(Clone, PartialEq, ::prost::Message)]
241pub struct FileScanNode {
242    #[prost(message, repeated, tag = "1")]
243    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
244    #[prost(enumeration = "file_scan_node::FileFormat", tag = "2")]
245    pub file_format: i32,
246    #[prost(enumeration = "file_scan_node::StorageType", tag = "3")]
247    pub storage_type: i32,
248    #[prost(string, tag = "4")]
249    pub s3_region: ::prost::alloc::string::String,
250    #[prost(string, tag = "5")]
251    pub s3_access_key: ::prost::alloc::string::String,
252    #[prost(string, tag = "6")]
253    pub s3_secret_key: ::prost::alloc::string::String,
254    #[prost(string, repeated, tag = "7")]
255    pub file_location: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
256    #[prost(string, tag = "8")]
257    pub s3_endpoint: ::prost::alloc::string::String,
258}
259/// Nested message and enum types in `FileScanNode`.
260pub mod file_scan_node {
261    #[derive(prost_helpers::AnyPB)]
262    #[derive(
263        Clone,
264        Copy,
265        Debug,
266        PartialEq,
267        Eq,
268        Hash,
269        PartialOrd,
270        Ord,
271        ::prost::Enumeration
272    )]
273    #[repr(i32)]
274    pub enum FileFormat {
275        Unspecified = 0,
276        Parquet = 1,
277    }
278    impl FileFormat {
279        /// String value of the enum field names used in the ProtoBuf definition.
280        ///
281        /// The values are not transformed in any way and thus are considered stable
282        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
283        pub fn as_str_name(&self) -> &'static str {
284            match self {
285                Self::Unspecified => "FILE_FORMAT_UNSPECIFIED",
286                Self::Parquet => "PARQUET",
287            }
288        }
289        /// Creates an enum from field names used in the ProtoBuf definition.
290        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
291            match value {
292                "FILE_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
293                "PARQUET" => Some(Self::Parquet),
294                _ => None,
295            }
296        }
297    }
298    #[derive(prost_helpers::AnyPB)]
299    #[derive(
300        Clone,
301        Copy,
302        Debug,
303        PartialEq,
304        Eq,
305        Hash,
306        PartialOrd,
307        Ord,
308        ::prost::Enumeration
309    )]
310    #[repr(i32)]
311    pub enum StorageType {
312        Unspecified = 0,
313        S3 = 1,
314        Gcs = 2,
315        Azblob = 3,
316    }
317    impl StorageType {
318        /// String value of the enum field names used in the ProtoBuf definition.
319        ///
320        /// The values are not transformed in any way and thus are considered stable
321        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
322        pub fn as_str_name(&self) -> &'static str {
323            match self {
324                Self::Unspecified => "STORAGE_TYPE_UNSPECIFIED",
325                Self::S3 => "S3",
326                Self::Gcs => "GCS",
327                Self::Azblob => "AZBLOB",
328            }
329        }
330        /// Creates an enum from field names used in the ProtoBuf definition.
331        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
332            match value {
333                "STORAGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
334                "S3" => Some(Self::S3),
335                "GCS" => Some(Self::Gcs),
336                "AZBLOB" => Some(Self::Azblob),
337                _ => None,
338            }
339        }
340    }
341}
342#[derive(prost_helpers::AnyPB)]
343#[derive(Clone, PartialEq, ::prost::Message)]
344pub struct GcsFileScanNode {
345    #[prost(message, repeated, tag = "1")]
346    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
347    #[prost(enumeration = "gcs_file_scan_node::FileFormat", tag = "2")]
348    pub file_format: i32,
349    #[prost(string, tag = "3")]
350    pub credential: ::prost::alloc::string::String,
351    #[prost(string, repeated, tag = "4")]
352    pub file_location: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
353}
354/// Nested message and enum types in `GcsFileScanNode`.
355pub mod gcs_file_scan_node {
356    #[derive(prost_helpers::AnyPB)]
357    #[derive(
358        Clone,
359        Copy,
360        Debug,
361        PartialEq,
362        Eq,
363        Hash,
364        PartialOrd,
365        Ord,
366        ::prost::Enumeration
367    )]
368    #[repr(i32)]
369    pub enum FileFormat {
370        Unspecified = 0,
371        Parquet = 1,
372    }
373    impl FileFormat {
374        /// String value of the enum field names used in the ProtoBuf definition.
375        ///
376        /// The values are not transformed in any way and thus are considered stable
377        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
378        pub fn as_str_name(&self) -> &'static str {
379            match self {
380                Self::Unspecified => "FILE_FORMAT_UNSPECIFIED",
381                Self::Parquet => "PARQUET",
382            }
383        }
384        /// Creates an enum from field names used in the ProtoBuf definition.
385        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
386            match value {
387                "FILE_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
388                "PARQUET" => Some(Self::Parquet),
389                _ => None,
390            }
391        }
392    }
393}
394#[derive(prost_helpers::AnyPB)]
395#[derive(Clone, PartialEq, ::prost::Message)]
396pub struct AzblobFileScanNode {
397    #[prost(message, repeated, tag = "1")]
398    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
399    #[prost(enumeration = "azblob_file_scan_node::FileFormat", tag = "2")]
400    pub file_format: i32,
401    #[prost(string, tag = "3")]
402    pub account_name: ::prost::alloc::string::String,
403    #[prost(string, tag = "4")]
404    pub account_key: ::prost::alloc::string::String,
405    #[prost(string, tag = "5")]
406    pub endpoint: ::prost::alloc::string::String,
407    #[prost(string, repeated, tag = "6")]
408    pub file_location: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
409}
410/// Nested message and enum types in `AzblobFileScanNode`.
411pub mod azblob_file_scan_node {
412    #[derive(prost_helpers::AnyPB)]
413    #[derive(
414        Clone,
415        Copy,
416        Debug,
417        PartialEq,
418        Eq,
419        Hash,
420        PartialOrd,
421        Ord,
422        ::prost::Enumeration
423    )]
424    #[repr(i32)]
425    pub enum FileFormat {
426        Unspecified = 0,
427        Parquet = 1,
428    }
429    impl FileFormat {
430        /// String value of the enum field names used in the ProtoBuf definition.
431        ///
432        /// The values are not transformed in any way and thus are considered stable
433        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
434        pub fn as_str_name(&self) -> &'static str {
435            match self {
436                Self::Unspecified => "FILE_FORMAT_UNSPECIFIED",
437                Self::Parquet => "PARQUET",
438            }
439        }
440        /// Creates an enum from field names used in the ProtoBuf definition.
441        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
442            match value {
443                "FILE_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
444                "PARQUET" => Some(Self::Parquet),
445                _ => None,
446            }
447        }
448    }
449}
450/// NOTE(kwannoel): This will only be used in batch mode. We can change the definition as needed.
451#[derive(prost_helpers::AnyPB)]
452#[derive(Clone, PartialEq, ::prost::Message)]
453pub struct PostgresQueryNode {
454    #[prost(message, repeated, tag = "1")]
455    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
456    #[prost(string, tag = "2")]
457    pub hostname: ::prost::alloc::string::String,
458    #[prost(string, tag = "3")]
459    pub port: ::prost::alloc::string::String,
460    #[prost(string, tag = "4")]
461    pub username: ::prost::alloc::string::String,
462    #[prost(string, tag = "5")]
463    pub password: ::prost::alloc::string::String,
464    #[prost(string, tag = "6")]
465    pub database: ::prost::alloc::string::String,
466    #[prost(string, tag = "7")]
467    pub query: ::prost::alloc::string::String,
468    #[prost(string, tag = "8")]
469    pub ssl_mode: ::prost::alloc::string::String,
470    #[prost(string, tag = "9")]
471    pub ssl_root_cert: ::prost::alloc::string::String,
472}
473/// NOTE(kwannoel): This will only be used in batch mode. We can change the definition as needed.
474#[derive(prost_helpers::AnyPB)]
475#[derive(Clone, PartialEq, ::prost::Message)]
476pub struct MySqlQueryNode {
477    #[prost(message, repeated, tag = "1")]
478    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnDesc>,
479    #[prost(string, tag = "2")]
480    pub hostname: ::prost::alloc::string::String,
481    #[prost(string, tag = "3")]
482    pub port: ::prost::alloc::string::String,
483    #[prost(string, tag = "4")]
484    pub username: ::prost::alloc::string::String,
485    #[prost(string, tag = "5")]
486    pub password: ::prost::alloc::string::String,
487    #[prost(string, tag = "6")]
488    pub database: ::prost::alloc::string::String,
489    #[prost(string, tag = "7")]
490    pub query: ::prost::alloc::string::String,
491}
492#[derive(prost_helpers::AnyPB)]
493#[derive(Clone, PartialEq, ::prost::Message)]
494pub struct ProjectNode {
495    #[prost(message, repeated, tag = "1")]
496    pub select_list: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
497}
498#[derive(prost_helpers::AnyPB)]
499#[derive(Clone, PartialEq, ::prost::Message)]
500pub struct FilterNode {
501    #[prost(message, optional, tag = "1")]
502    pub search_condition: ::core::option::Option<super::expr::ExprNode>,
503}
504#[derive(prost_helpers::AnyPB)]
505#[derive(Clone, PartialEq, ::prost::Message)]
506pub struct LogRowSeqScanNode {
507    #[prost(message, optional, tag = "1")]
508    pub table_desc: ::core::option::Option<super::plan_common::StorageTableDesc>,
509    /// This records the mandatory column_ids of the original table, excluding op
510    #[prost(int32, repeated, tag = "2")]
511    pub column_ids: ::prost::alloc::vec::Vec<i32>,
512    /// The partition to read for scan tasks.
513    ///
514    /// Will be filled by the scheduler.
515    #[prost(message, optional, tag = "3")]
516    pub vnode_bitmap: ::core::option::Option<super::common::Buffer>,
517    #[prost(message, optional, tag = "4")]
518    pub old_epoch: ::core::option::Option<super::common::BatchQueryEpoch>,
519    #[prost(message, optional, tag = "5")]
520    pub new_epoch: ::core::option::Option<super::common::BatchQueryEpoch>,
521    #[prost(bool, tag = "6")]
522    pub ordered: bool,
523    #[prost(message, optional, tag = "7")]
524    pub scan_range: ::core::option::Option<ScanRange>,
525}
526#[derive(prost_helpers::AnyPB)]
527#[derive(Clone, PartialEq, ::prost::Message)]
528pub struct InsertNode {
529    /// Id of the table to perform inserting.
530    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
531    pub table_id: crate::id::TableId,
532    /// Version of the table.
533    #[prost(uint64, tag = "5")]
534    pub table_version_id: u64,
535    #[prost(uint32, repeated, tag = "2")]
536    pub column_indices: ::prost::alloc::vec::Vec<u32>,
537    #[prost(message, optional, tag = "6")]
538    pub default_columns: ::core::option::Option<super::plan_common::DefaultColumns>,
539    /// An optional field and will be `None` for tables without user-defined pk.
540    /// The `BatchInsertExecutor` should add a column with NULL value which will
541    /// be filled in streaming.
542    #[prost(uint32, optional, tag = "3")]
543    pub row_id_index: ::core::option::Option<u32>,
544    #[prost(bool, tag = "4")]
545    pub returning: bool,
546    /// Session id is used to ensure that dml data from the same session should be sent to a fixed worker node and channel.
547    #[prost(uint32, tag = "7")]
548    pub session_id: u32,
549    /// If enabled, wait until this DML transaction is included in a successful checkpoint.
550    #[prost(bool, tag = "8")]
551    pub wait_for_persistence: bool,
552}
553#[derive(prost_helpers::AnyPB)]
554#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
555pub struct DeleteNode {
556    /// Id of the table to perform deleting.
557    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
558    pub table_id: crate::id::TableId,
559    /// Version of the table.
560    #[prost(uint64, tag = "3")]
561    pub table_version_id: u64,
562    /// Primary key indices of the table.
563    #[prost(uint32, repeated, tag = "5")]
564    pub pk_indices: ::prost::alloc::vec::Vec<u32>,
565    #[prost(bool, tag = "2")]
566    pub returning: bool,
567    /// If enabled, only key columns are kept and the rest are NULL.
568    #[prost(bool, tag = "6")]
569    pub upsert: bool,
570    /// Session id is used to ensure that dml data from the same session should be sent to a fixed worker node and channel.
571    #[prost(uint32, tag = "4")]
572    pub session_id: u32,
573    /// If enabled, wait until this DML transaction is included in a successful checkpoint.
574    #[prost(bool, tag = "7")]
575    pub wait_for_persistence: bool,
576}
577#[derive(prost_helpers::AnyPB)]
578#[derive(Clone, PartialEq, ::prost::Message)]
579pub struct UpdateNode {
580    /// Id of the table to perform updating.
581    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
582    pub table_id: crate::id::TableId,
583    /// Version of the table.
584    #[prost(uint64, tag = "2")]
585    pub table_version_id: u64,
586    /// Expressions to generate `U-` records.
587    #[prost(message, repeated, tag = "3")]
588    pub old_exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
589    /// Expressions to generate `U+` records.
590    #[prost(message, repeated, tag = "4")]
591    pub new_exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
592    #[prost(bool, tag = "5")]
593    pub returning: bool,
594    /// If enabled, only `Insert` records are emitted for new rows.
595    #[prost(bool, tag = "7")]
596    pub upsert: bool,
597    /// Session id is used to ensure that dml data from the same session should be sent to a fixed worker node and channel.
598    #[prost(uint32, tag = "6")]
599    pub session_id: u32,
600    /// If enabled, wait until this DML transaction is included in a successful checkpoint.
601    #[prost(bool, tag = "8")]
602    pub wait_for_persistence: bool,
603}
604#[derive(prost_helpers::AnyPB)]
605#[derive(Clone, PartialEq, ::prost::Message)]
606pub struct ValuesNode {
607    #[prost(message, repeated, tag = "1")]
608    pub tuples: ::prost::alloc::vec::Vec<values_node::ExprTuple>,
609    #[prost(message, repeated, tag = "2")]
610    pub fields: ::prost::alloc::vec::Vec<super::plan_common::Field>,
611}
612/// Nested message and enum types in `ValuesNode`.
613pub mod values_node {
614    #[derive(prost_helpers::AnyPB)]
615    #[derive(Clone, PartialEq, ::prost::Message)]
616    pub struct ExprTuple {
617        #[prost(message, repeated, tag = "1")]
618        pub cells: ::prost::alloc::vec::Vec<super::super::expr::ExprNode>,
619    }
620}
621#[derive(prost_helpers::AnyPB)]
622#[derive(Clone, PartialEq, ::prost::Message)]
623pub struct SortNode {
624    #[prost(message, repeated, tag = "1")]
625    pub column_orders: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
626}
627#[derive(prost_helpers::AnyPB)]
628#[derive(Clone, PartialEq, ::prost::Message)]
629pub struct TopNNode {
630    #[prost(message, repeated, tag = "1")]
631    pub column_orders: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
632    #[prost(uint64, tag = "2")]
633    pub limit: u64,
634    #[prost(uint64, tag = "3")]
635    pub offset: u64,
636    #[prost(bool, tag = "4")]
637    pub with_ties: bool,
638}
639#[derive(prost_helpers::AnyPB)]
640#[derive(Clone, PartialEq, ::prost::Message)]
641pub struct GroupTopNNode {
642    #[prost(message, repeated, tag = "1")]
643    pub column_orders: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
644    #[prost(uint64, tag = "2")]
645    pub limit: u64,
646    #[prost(uint64, tag = "3")]
647    pub offset: u64,
648    #[prost(uint32, repeated, tag = "4")]
649    pub group_key: ::prost::alloc::vec::Vec<u32>,
650    #[prost(bool, tag = "5")]
651    pub with_ties: bool,
652}
653#[derive(prost_helpers::AnyPB)]
654#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
655pub struct LimitNode {
656    #[prost(uint64, tag = "1")]
657    pub limit: u64,
658    #[prost(uint64, tag = "2")]
659    pub offset: u64,
660}
661#[derive(prost_helpers::AnyPB)]
662#[derive(Clone, PartialEq, ::prost::Message)]
663pub struct NestedLoopJoinNode {
664    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
665    pub join_type: i32,
666    #[prost(message, optional, tag = "2")]
667    pub join_cond: ::core::option::Option<super::expr::ExprNode>,
668    #[prost(uint32, repeated, tag = "3")]
669    pub output_indices: ::prost::alloc::vec::Vec<u32>,
670}
671#[derive(prost_helpers::AnyPB)]
672#[derive(Clone, PartialEq, ::prost::Message)]
673pub struct HashAggNode {
674    #[prost(uint32, repeated, tag = "1")]
675    pub group_key: ::prost::alloc::vec::Vec<u32>,
676    #[prost(message, repeated, tag = "2")]
677    pub agg_calls: ::prost::alloc::vec::Vec<super::expr::AggCall>,
678}
679#[derive(prost_helpers::AnyPB)]
680#[derive(Clone, PartialEq, ::prost::Message)]
681pub struct ExpandNode {
682    #[prost(message, repeated, tag = "1")]
683    pub column_subsets: ::prost::alloc::vec::Vec<expand_node::Subset>,
684}
685/// Nested message and enum types in `ExpandNode`.
686pub mod expand_node {
687    #[derive(prost_helpers::AnyPB)]
688    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
689    pub struct Subset {
690        #[prost(uint32, repeated, tag = "1")]
691        pub column_indices: ::prost::alloc::vec::Vec<u32>,
692    }
693}
694#[derive(prost_helpers::AnyPB)]
695#[derive(Clone, PartialEq, ::prost::Message)]
696pub struct ProjectSetNode {
697    #[prost(message, repeated, tag = "1")]
698    pub select_list: ::prost::alloc::vec::Vec<super::expr::ProjectSetSelectItem>,
699}
700#[derive(prost_helpers::AnyPB)]
701#[derive(Clone, PartialEq, ::prost::Message)]
702pub struct SortAggNode {
703    #[prost(message, repeated, tag = "1")]
704    pub group_key: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
705    #[prost(message, repeated, tag = "2")]
706    pub agg_calls: ::prost::alloc::vec::Vec<super::expr::AggCall>,
707}
708#[derive(prost_helpers::AnyPB)]
709#[derive(Clone, PartialEq, ::prost::Message)]
710pub struct HashJoinNode {
711    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
712    pub join_type: i32,
713    #[prost(int32, repeated, tag = "2")]
714    pub left_key: ::prost::alloc::vec::Vec<i32>,
715    #[prost(int32, repeated, tag = "3")]
716    pub right_key: ::prost::alloc::vec::Vec<i32>,
717    #[prost(message, optional, tag = "4")]
718    pub condition: ::core::option::Option<super::expr::ExprNode>,
719    #[prost(uint32, repeated, tag = "5")]
720    pub output_indices: ::prost::alloc::vec::Vec<u32>,
721    /// Null safe means it treats `null = null` as true.
722    /// Each key pair can be null safe independently. (left_key, right_key, null_safe)
723    #[prost(bool, repeated, tag = "6")]
724    pub null_safe: ::prost::alloc::vec::Vec<bool>,
725    #[prost(message, optional, tag = "7")]
726    pub asof_desc: ::core::option::Option<super::plan_common::AsOfJoinDesc>,
727}
728#[derive(prost_helpers::AnyPB)]
729#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
730pub struct SortMergeJoinNode {
731    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
732    pub join_type: i32,
733    #[prost(int32, repeated, tag = "2")]
734    pub left_key: ::prost::alloc::vec::Vec<i32>,
735    #[prost(int32, repeated, tag = "3")]
736    pub right_key: ::prost::alloc::vec::Vec<i32>,
737    #[prost(enumeration = "super::common::Direction", tag = "4")]
738    pub direction: i32,
739    #[prost(uint32, repeated, tag = "5")]
740    pub output_indices: ::prost::alloc::vec::Vec<u32>,
741}
742#[derive(prost_helpers::AnyPB)]
743#[derive(Clone, PartialEq, ::prost::Message)]
744pub struct HopWindowNode {
745    #[prost(uint32, tag = "1")]
746    pub time_col: u32,
747    #[prost(message, optional, tag = "2")]
748    pub window_slide: ::core::option::Option<super::data::Interval>,
749    #[prost(message, optional, tag = "3")]
750    pub window_size: ::core::option::Option<super::data::Interval>,
751    #[prost(uint32, repeated, tag = "4")]
752    pub output_indices: ::prost::alloc::vec::Vec<u32>,
753    #[prost(message, repeated, tag = "5")]
754    pub window_start_exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
755    #[prost(message, repeated, tag = "6")]
756    pub window_end_exprs: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
757}
758#[derive(prost_helpers::AnyPB)]
759#[derive(Clone, PartialEq, ::prost::Message)]
760pub struct TableFunctionNode {
761    #[prost(message, optional, tag = "1")]
762    pub table_function: ::core::option::Option<super::expr::TableFunction>,
763}
764/// Task is a running instance of Stage.
765#[derive(prost_helpers::AnyPB)]
766#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
767pub struct TaskId {
768    #[prost(string, tag = "1")]
769    pub query_id: ::prost::alloc::string::String,
770    #[prost(uint32, tag = "2")]
771    pub stage_id: u32,
772    #[prost(uint64, tag = "3")]
773    pub task_id: u64,
774}
775/// Every task will create N buffers (channels) for parent operators to fetch results from,
776/// where N is the parallelism of parent stage.
777#[derive(prost_helpers::AnyPB)]
778#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
779pub struct TaskOutputId {
780    #[prost(message, optional, tag = "1")]
781    pub task_id: ::core::option::Option<TaskId>,
782    /// The id of output channel to fetch from
783    #[prost(uint64, tag = "2")]
784    pub output_id: u64,
785}
786#[derive(prost_helpers::AnyPB)]
787#[derive(Clone, PartialEq, ::prost::Message)]
788pub struct LocalExecutePlan {
789    #[prost(message, optional, tag = "1")]
790    pub plan: ::core::option::Option<PlanFragment>,
791    #[prost(map = "string, string", tag = "3")]
792    pub tracing_context: ::std::collections::HashMap<
793        ::prost::alloc::string::String,
794        ::prost::alloc::string::String,
795    >,
796}
797/// ExchangeSource describes where to read results from children operators
798#[derive(prost_helpers::AnyPB)]
799#[derive(Clone, PartialEq, ::prost::Message)]
800pub struct ExchangeSource {
801    #[prost(message, optional, tag = "1")]
802    pub task_output_id: ::core::option::Option<TaskOutputId>,
803    #[prost(message, optional, tag = "2")]
804    pub host: ::core::option::Option<super::common::HostAddress>,
805    #[prost(oneof = "exchange_source::LocalExecutePlan", tags = "3")]
806    pub local_execute_plan: ::core::option::Option<exchange_source::LocalExecutePlan>,
807}
808/// Nested message and enum types in `ExchangeSource`.
809pub mod exchange_source {
810    #[derive(prost_helpers::AnyPB)]
811    #[derive(Clone, PartialEq, ::prost::Oneof)]
812    pub enum LocalExecutePlan {
813        #[prost(message, tag = "3")]
814        Plan(super::LocalExecutePlan),
815    }
816}
817#[derive(prost_helpers::AnyPB)]
818#[derive(Clone, PartialEq, ::prost::Message)]
819pub struct ExchangeNode {
820    #[prost(message, repeated, tag = "1")]
821    pub sources: ::prost::alloc::vec::Vec<ExchangeSource>,
822    /// sequential means each tasks of the exchange node will be executed sequentially.
823    #[prost(bool, tag = "2")]
824    pub sequential: bool,
825    #[prost(message, repeated, tag = "3")]
826    pub input_schema: ::prost::alloc::vec::Vec<super::plan_common::Field>,
827}
828#[derive(prost_helpers::AnyPB)]
829#[derive(Clone, PartialEq, ::prost::Message)]
830pub struct MergeSortExchangeNode {
831    #[prost(message, optional, tag = "1")]
832    pub exchange: ::core::option::Option<ExchangeNode>,
833    #[prost(message, repeated, tag = "2")]
834    pub column_orders: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
835}
836#[derive(prost_helpers::AnyPB)]
837#[derive(Clone, PartialEq, ::prost::Message)]
838pub struct LocalLookupJoinNode {
839    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
840    pub join_type: i32,
841    #[prost(message, optional, tag = "2")]
842    pub condition: ::core::option::Option<super::expr::ExprNode>,
843    #[prost(uint32, repeated, tag = "3")]
844    pub outer_side_key: ::prost::alloc::vec::Vec<u32>,
845    #[prost(uint32, repeated, tag = "4")]
846    pub inner_side_key: ::prost::alloc::vec::Vec<u32>,
847    #[prost(uint32, tag = "5")]
848    pub lookup_prefix_len: u32,
849    #[prost(message, optional, tag = "6")]
850    pub inner_side_table_desc: ::core::option::Option<
851        super::plan_common::StorageTableDesc,
852    >,
853    #[prost(uint64, repeated, tag = "7")]
854    pub inner_side_vnode_mapping: ::prost::alloc::vec::Vec<u64>,
855    #[prost(int32, repeated, tag = "8")]
856    pub inner_side_column_ids: ::prost::alloc::vec::Vec<i32>,
857    #[prost(uint32, repeated, tag = "9")]
858    pub output_indices: ::prost::alloc::vec::Vec<u32>,
859    #[prost(message, repeated, tag = "10")]
860    pub worker_nodes: ::prost::alloc::vec::Vec<super::common::WorkerNode>,
861    /// Null safe means it treats `null = null` as true.
862    /// Each key pair can be null safe independently. (left_key, right_key, null_safe)
863    #[prost(bool, repeated, tag = "11")]
864    pub null_safe: ::prost::alloc::vec::Vec<bool>,
865    #[prost(message, optional, tag = "12")]
866    pub query_epoch: ::core::option::Option<super::common::BatchQueryEpoch>,
867    #[prost(message, optional, tag = "13")]
868    pub asof_desc: ::core::option::Option<super::plan_common::AsOfJoinDesc>,
869}
870/// RFC: A new schedule way for distributed lookup join
871/// <https://github.com/risingwavelabs/rfcs/pull/6>
872#[derive(prost_helpers::AnyPB)]
873#[derive(Clone, PartialEq, ::prost::Message)]
874pub struct DistributedLookupJoinNode {
875    #[prost(enumeration = "super::plan_common::JoinType", tag = "1")]
876    pub join_type: i32,
877    #[prost(message, optional, tag = "2")]
878    pub condition: ::core::option::Option<super::expr::ExprNode>,
879    #[prost(uint32, repeated, tag = "3")]
880    pub outer_side_key: ::prost::alloc::vec::Vec<u32>,
881    #[prost(uint32, repeated, tag = "4")]
882    pub inner_side_key: ::prost::alloc::vec::Vec<u32>,
883    #[prost(uint32, tag = "5")]
884    pub lookup_prefix_len: u32,
885    #[prost(message, optional, tag = "6")]
886    pub inner_side_table_desc: ::core::option::Option<
887        super::plan_common::StorageTableDesc,
888    >,
889    #[prost(int32, repeated, tag = "7")]
890    pub inner_side_column_ids: ::prost::alloc::vec::Vec<i32>,
891    #[prost(uint32, repeated, tag = "8")]
892    pub output_indices: ::prost::alloc::vec::Vec<u32>,
893    /// Null safe means it treats `null = null` as true.
894    /// Each key pair can be null safe independently. (left_key, right_key, null_safe)
895    #[prost(bool, repeated, tag = "9")]
896    pub null_safe: ::prost::alloc::vec::Vec<bool>,
897    #[prost(message, optional, tag = "10")]
898    pub query_epoch: ::core::option::Option<super::common::BatchQueryEpoch>,
899    #[prost(message, optional, tag = "11")]
900    pub asof_desc: ::core::option::Option<super::plan_common::AsOfJoinDesc>,
901}
902#[derive(prost_helpers::AnyPB)]
903#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
904pub struct UnionNode {}
905#[derive(prost_helpers::AnyPB)]
906#[derive(Clone, PartialEq, ::prost::Message)]
907pub struct SortOverWindowNode {
908    #[prost(message, repeated, tag = "1")]
909    pub calls: ::prost::alloc::vec::Vec<super::expr::WindowFunction>,
910    #[prost(uint32, repeated, tag = "2")]
911    pub partition_by: ::prost::alloc::vec::Vec<u32>,
912    #[prost(message, repeated, tag = "3")]
913    pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
914}
915#[derive(prost_helpers::AnyPB)]
916#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
917pub struct MaxOneRowNode {}
918#[derive(prost_helpers::AnyPB)]
919#[derive(Clone, PartialEq, ::prost::Message)]
920pub struct VectorIndexNearestNode {
921    #[prost(message, optional, tag = "1")]
922    pub reader_desc: ::core::option::Option<super::plan_common::VectorIndexReaderDesc>,
923    #[prost(uint32, tag = "2")]
924    pub vector_column_idx: u32,
925    #[prost(message, optional, tag = "8")]
926    pub query_epoch: ::core::option::Option<super::common::BatchQueryEpoch>,
927}
928#[derive(prost_helpers::AnyPB)]
929#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
930pub struct GetChannelDeltaStatsNode {
931    /// Optional timestamp to get channel stats at a specific time
932    #[prost(uint64, optional, tag = "1")]
933    pub at_time: ::core::option::Option<u64>,
934    /// Time offset in seconds for the query window
935    #[prost(uint64, optional, tag = "2")]
936    pub time_offset: ::core::option::Option<u64>,
937}
938#[derive(prost_helpers::AnyPB)]
939#[derive(Clone, PartialEq, ::prost::Message)]
940pub struct PlanNode {
941    #[prost(message, repeated, tag = "1")]
942    pub children: ::prost::alloc::vec::Vec<PlanNode>,
943    #[prost(string, tag = "24")]
944    pub identity: ::prost::alloc::string::String,
945    #[prost(
946        oneof = "plan_node::NodeBody",
947        tags = "2, 3, 4, 5, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 21, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 100, 101"
948    )]
949    pub node_body: ::core::option::Option<plan_node::NodeBody>,
950}
951/// Nested message and enum types in `PlanNode`.
952pub mod plan_node {
953    #[derive(prost_helpers::AnyPB)]
954    #[derive(::enum_as_inner::EnumAsInner, ::strum::Display, ::strum::EnumDiscriminants)]
955    #[strum_discriminants(derive(::strum::Display, Hash))]
956    #[derive(Clone, PartialEq, ::prost::Oneof)]
957    pub enum NodeBody {
958        #[prost(message, tag = "2")]
959        Insert(super::InsertNode),
960        #[prost(message, tag = "3")]
961        Delete(super::DeleteNode),
962        #[prost(message, tag = "4")]
963        Update(super::UpdateNode),
964        #[prost(message, tag = "5")]
965        Project(super::ProjectNode),
966        #[prost(message, tag = "7")]
967        HashAgg(super::HashAggNode),
968        #[prost(message, tag = "8")]
969        Filter(super::FilterNode),
970        #[prost(message, tag = "9")]
971        Exchange(super::ExchangeNode),
972        #[prost(message, tag = "10")]
973        Sort(super::SortNode),
974        #[prost(message, tag = "11")]
975        NestedLoopJoin(super::NestedLoopJoinNode),
976        #[prost(message, tag = "14")]
977        TopN(super::TopNNode),
978        #[prost(message, tag = "15")]
979        SortAgg(super::SortAggNode),
980        #[prost(message, tag = "16")]
981        RowSeqScan(super::RowSeqScanNode),
982        #[prost(message, tag = "17")]
983        Limit(super::LimitNode),
984        #[prost(message, tag = "18")]
985        Values(super::ValuesNode),
986        #[prost(message, tag = "19")]
987        HashJoin(super::HashJoinNode),
988        #[prost(message, tag = "21")]
989        MergeSortExchange(super::MergeSortExchangeNode),
990        #[prost(message, tag = "25")]
991        HopWindow(super::HopWindowNode),
992        #[prost(message, tag = "26")]
993        TableFunction(super::TableFunctionNode),
994        #[prost(message, tag = "27")]
995        SysRowSeqScan(super::SysRowSeqScanNode),
996        #[prost(message, tag = "28")]
997        Expand(super::ExpandNode),
998        #[prost(message, tag = "29")]
999        LocalLookupJoin(super::LocalLookupJoinNode),
1000        #[prost(message, tag = "30")]
1001        ProjectSet(super::ProjectSetNode),
1002        #[prost(message, tag = "31")]
1003        Union(super::UnionNode),
1004        #[prost(message, tag = "32")]
1005        GroupTopN(super::GroupTopNNode),
1006        #[prost(message, tag = "33")]
1007        DistributedLookupJoin(super::DistributedLookupJoinNode),
1008        #[prost(message, tag = "34")]
1009        Source(super::SourceNode),
1010        #[prost(message, tag = "35")]
1011        SortOverWindow(super::SortOverWindowNode),
1012        #[prost(message, tag = "36")]
1013        MaxOneRow(super::MaxOneRowNode),
1014        #[prost(message, tag = "37")]
1015        LogRowSeqScan(super::LogRowSeqScanNode),
1016        #[prost(message, tag = "38")]
1017        FileScan(super::FileScanNode),
1018        #[prost(message, tag = "39")]
1019        IcebergScan(super::IcebergScanNode),
1020        #[prost(message, tag = "40")]
1021        PostgresQuery(super::PostgresQueryNode),
1022        #[prost(message, tag = "41")]
1023        MysqlQuery(super::MySqlQueryNode),
1024        #[prost(message, tag = "42")]
1025        GcsFileScan(super::GcsFileScanNode),
1026        #[prost(message, tag = "43")]
1027        AzblobFileScan(super::AzblobFileScanNode),
1028        #[prost(message, tag = "44")]
1029        VectorIndexNearest(super::VectorIndexNearestNode),
1030        #[prost(message, tag = "45")]
1031        GetChannelDeltaStats(super::GetChannelDeltaStatsNode),
1032        #[prost(message, tag = "46")]
1033        IcebergMetadataScan(super::IcebergMetadataScanNode),
1034        /// The following nodes are used for testing.
1035        #[prost(bool, tag = "100")]
1036        BlockExecutor(bool),
1037        #[prost(bool, tag = "101")]
1038        BusyLoopExecutor(bool),
1039    }
1040}
1041/// ExchangeInfo determines how to distribute results to tasks of next stage.
1042///
1043/// Note that the fragment itself does not know the where are the receivers. Instead, it prepares results in
1044/// N buffers and wait for parent operators (`Exchange` nodes) to pull data from a specified buffer
1045#[derive(prost_helpers::AnyPB)]
1046#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1047pub struct ExchangeInfo {
1048    #[prost(enumeration = "exchange_info::DistributionMode", tag = "1")]
1049    pub mode: i32,
1050    #[prost(oneof = "exchange_info::Distribution", tags = "2, 3, 4")]
1051    pub distribution: ::core::option::Option<exchange_info::Distribution>,
1052}
1053/// Nested message and enum types in `ExchangeInfo`.
1054pub mod exchange_info {
1055    #[derive(prost_helpers::AnyPB)]
1056    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1057    pub struct BroadcastInfo {
1058        #[prost(uint32, tag = "1")]
1059        pub count: u32,
1060    }
1061    #[derive(prost_helpers::AnyPB)]
1062    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1063    pub struct HashInfo {
1064        #[prost(uint32, tag = "1")]
1065        pub output_count: u32,
1066        #[prost(uint32, repeated, tag = "3")]
1067        pub key: ::prost::alloc::vec::Vec<u32>,
1068    }
1069    #[derive(prost_helpers::AnyPB)]
1070    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1071    pub struct ConsistentHashInfo {
1072        /// `vmap` maps virtual node to down stream task id
1073        #[prost(uint32, repeated, tag = "1")]
1074        pub vmap: ::prost::alloc::vec::Vec<u32>,
1075        #[prost(uint32, repeated, tag = "2")]
1076        pub key: ::prost::alloc::vec::Vec<u32>,
1077    }
1078    #[derive(prost_helpers::AnyPB)]
1079    #[derive(
1080        Clone,
1081        Copy,
1082        Debug,
1083        PartialEq,
1084        Eq,
1085        Hash,
1086        PartialOrd,
1087        Ord,
1088        ::prost::Enumeration
1089    )]
1090    #[repr(i32)]
1091    pub enum DistributionMode {
1092        /// No partitioning at all, used for root segment which aggregates query results
1093        Unspecified = 0,
1094        Single = 1,
1095        Broadcast = 2,
1096        Hash = 3,
1097        ConsistentHash = 4,
1098    }
1099    impl DistributionMode {
1100        /// String value of the enum field names used in the ProtoBuf definition.
1101        ///
1102        /// The values are not transformed in any way and thus are considered stable
1103        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1104        pub fn as_str_name(&self) -> &'static str {
1105            match self {
1106                Self::Unspecified => "UNSPECIFIED",
1107                Self::Single => "SINGLE",
1108                Self::Broadcast => "BROADCAST",
1109                Self::Hash => "HASH",
1110                Self::ConsistentHash => "CONSISTENT_HASH",
1111            }
1112        }
1113        /// Creates an enum from field names used in the ProtoBuf definition.
1114        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1115            match value {
1116                "UNSPECIFIED" => Some(Self::Unspecified),
1117                "SINGLE" => Some(Self::Single),
1118                "BROADCAST" => Some(Self::Broadcast),
1119                "HASH" => Some(Self::Hash),
1120                "CONSISTENT_HASH" => Some(Self::ConsistentHash),
1121                _ => None,
1122            }
1123        }
1124    }
1125    #[derive(prost_helpers::AnyPB)]
1126    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1127    pub enum Distribution {
1128        #[prost(message, tag = "2")]
1129        BroadcastInfo(BroadcastInfo),
1130        #[prost(message, tag = "3")]
1131        HashInfo(HashInfo),
1132        #[prost(message, tag = "4")]
1133        ConsistentHashInfo(ConsistentHashInfo),
1134    }
1135}
1136#[derive(prost_helpers::AnyPB)]
1137#[derive(Clone, PartialEq, ::prost::Message)]
1138pub struct PlanFragment {
1139    #[prost(message, optional, tag = "1")]
1140    pub root: ::core::option::Option<PlanNode>,
1141    #[prost(message, optional, tag = "2")]
1142    pub exchange_info: ::core::option::Option<ExchangeInfo>,
1143}