Skip to main content

risingwave_pb/
plan_common.rs

1// This file is @generated by prost-build.
2/// Field is a column in the streaming or batch plan.
3#[derive(prost_helpers::AnyPB)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Field {
6    #[prost(message, optional, tag = "1")]
7    pub data_type: ::core::option::Option<super::data::DataType>,
8    #[prost(string, tag = "2")]
9    pub name: ::prost::alloc::string::String,
10}
11#[derive(prost_helpers::AnyPB)]
12#[derive(Eq, Hash)]
13#[derive(Clone, PartialEq, ::prost::Message)]
14#[prost(skip_debug)]
15pub struct ColumnDesc {
16    #[prost(message, optional, tag = "1")]
17    pub column_type: ::core::option::Option<super::data::DataType>,
18    #[prost(int32, tag = "2")]
19    pub column_id: i32,
20    /// we store the column name in column desc now just for debug, but in future
21    /// we should store it in ColumnCatalog but not here
22    #[prost(string, tag = "3")]
23    pub name: ::prost::alloc::string::String,
24    /// This field is used to store the description set by the `comment on` clause.
25    #[prost(string, optional, tag = "8")]
26    pub description: ::core::option::Option<::prost::alloc::string::String>,
27    /// deprecated, use AdditionalColumn instead, keep for compatibility with v1.6.x
28    #[prost(enumeration = "AdditionalColumnType", tag = "9")]
29    pub additional_column_type: i32,
30    #[prost(enumeration = "ColumnDescVersion", tag = "10")]
31    pub version: i32,
32    #[prost(message, optional, tag = "11")]
33    pub additional_column: ::core::option::Option<AdditionalColumn>,
34    #[prost(bool, optional, tag = "12")]
35    pub nullable: ::core::option::Option<bool>,
36    /// Optional description for the generated column or default value.
37    #[prost(oneof = "column_desc::GeneratedOrDefaultColumn", tags = "6, 7")]
38    pub generated_or_default_column: ::core::option::Option<
39        column_desc::GeneratedOrDefaultColumn,
40    >,
41}
42/// Nested message and enum types in `ColumnDesc`.
43pub mod column_desc {
44    /// Optional description for the generated column or default value.
45    #[derive(prost_helpers::AnyPB)]
46    #[derive(Eq, Hash)]
47    #[derive(Clone, PartialEq, ::prost::Oneof)]
48    #[prost(skip_debug)]
49    pub enum GeneratedOrDefaultColumn {
50        #[prost(message, tag = "6")]
51        GeneratedColumn(super::GeneratedColumnDesc),
52        #[prost(message, tag = "7")]
53        DefaultColumn(super::DefaultColumnDesc),
54    }
55}
56#[derive(prost_helpers::AnyPB)]
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct ColumnCatalog {
59    #[prost(message, optional, tag = "1")]
60    pub column_desc: ::core::option::Option<ColumnDesc>,
61    #[prost(bool, tag = "2")]
62    pub is_hidden: bool,
63}
64#[derive(prost_helpers::AnyPB)]
65#[derive(Eq, Hash)]
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct GeneratedColumnDesc {
68    #[prost(message, optional, tag = "1")]
69    pub expr: ::core::option::Option<super::expr::ExprNode>,
70}
71#[derive(prost_helpers::AnyPB)]
72#[derive(Eq, Hash)]
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct DefaultColumnDesc {
75    /// Expression of the `DEFAULT`. Used when inserting new records.
76    #[prost(message, optional, tag = "1")]
77    pub expr: ::core::option::Option<super::expr::ExprNode>,
78    /// Evaluated value of the expression at the time of the table creation or the
79    /// column addition. Used when filling the default value for the records where
80    /// the column is missing.
81    #[prost(message, optional, tag = "2")]
82    pub snapshot_value: ::core::option::Option<super::data::Datum>,
83}
84#[derive(prost_helpers::AnyPB)]
85#[derive(Clone, PartialEq, ::prost::Message)]
86pub struct StorageTableDesc {
87    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
88    pub table_id: crate::id::TableId,
89    #[prost(message, repeated, tag = "2")]
90    pub columns: ::prost::alloc::vec::Vec<ColumnDesc>,
91    /// TODO: may refactor primary key representations
92    #[prost(message, repeated, tag = "3")]
93    pub pk: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
94    #[prost(uint32, repeated, tag = "4")]
95    pub dist_key_in_pk_indices: ::prost::alloc::vec::Vec<u32>,
96    #[prost(uint32, repeated, tag = "6")]
97    pub value_indices: ::prost::alloc::vec::Vec<u32>,
98    #[prost(uint32, tag = "7")]
99    pub read_prefix_len_hint: u32,
100    /// Whether the table is versioned. If `true`, column-aware row encoding will
101    /// be used to be compatible with schema changes.
102    #[prost(bool, tag = "8")]
103    pub versioned: bool,
104    #[prost(uint32, repeated, tag = "9")]
105    pub stream_key: ::prost::alloc::vec::Vec<u32>,
106    #[prost(uint32, optional, tag = "10")]
107    pub vnode_col_idx_in_pk: ::core::option::Option<u32>,
108    #[prost(uint32, optional, tag = "11")]
109    pub retention_seconds: ::core::option::Option<u32>,
110    /// Total vnode count of the table.
111    ///
112    /// Can be unset if the table is created in older versions where variable vnode count is not
113    /// supported, in which case a default value of 256 (or 1 for singleton) should be used.
114    /// Use `VnodeCountCompat::vnode_count` to access it.
115    #[prost(uint32, optional, tag = "12")]
116    pub maybe_vnode_count: ::core::option::Option<u32>,
117}
118#[derive(prost_helpers::AnyPB)]
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct VectorIndexReaderDesc {
121    /// The table_id of the vector index to search.
122    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
123    pub table_id: crate::id::TableId,
124    /// The columns of the vector index info.
125    #[prost(message, repeated, tag = "2")]
126    pub info_column_desc: ::prost::alloc::vec::Vec<ColumnDesc>,
127    #[prost(uint32, repeated, tag = "3")]
128    pub info_output_indices: ::prost::alloc::vec::Vec<u32>,
129    /// Whether or not to include the distance column in the output
130    #[prost(bool, tag = "4")]
131    pub include_distance: bool,
132    /// The number of nearest neighbors to return.
133    #[prost(uint32, tag = "5")]
134    pub top_n: u32,
135    /// The distance metric to use for the search.
136    #[prost(enumeration = "super::common::DistanceType", tag = "6")]
137    pub distance_type: i32,
138    /// The ef_search used to query hnsw index
139    #[prost(uint32, tag = "7")]
140    pub hnsw_ef_search: u32,
141}
142#[derive(prost_helpers::AnyPB)]
143#[derive(Eq, Hash)]
144#[derive(Clone, PartialEq, ::prost::Message)]
145pub struct CdcKeyOrdering {
146    #[prost(message, repeated, tag = "1")]
147    pub columns: ::prost::alloc::vec::Vec<cdc_key_ordering::Column>,
148}
149/// Nested message and enum types in `CdcKeyOrdering`.
150pub mod cdc_key_ordering {
151    #[derive(prost_helpers::AnyPB)]
152    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
153    pub struct Column {
154        #[prost(uint32, tag = "1")]
155        pub pk_col_idx: u32,
156        #[prost(enumeration = "Comparison", tag = "2")]
157        pub comparison: i32,
158    }
159    #[derive(prost_helpers::AnyPB)]
160    #[derive(
161        Clone,
162        Copy,
163        Debug,
164        PartialEq,
165        Eq,
166        Hash,
167        PartialOrd,
168        Ord,
169        ::prost::Enumeration
170    )]
171    #[repr(i32)]
172    pub enum Comparison {
173        Unspecified = 0,
174        Native = 1,
175        UnsignedInt64 = 2,
176    }
177    impl Comparison {
178        /// String value of the enum field names used in the ProtoBuf definition.
179        ///
180        /// The values are not transformed in any way and thus are considered stable
181        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
182        pub fn as_str_name(&self) -> &'static str {
183            match self {
184                Self::Unspecified => "COMPARISON_UNSPECIFIED",
185                Self::Native => "COMPARISON_NATIVE",
186                Self::UnsignedInt64 => "COMPARISON_UNSIGNED_INT64",
187            }
188        }
189        /// Creates an enum from field names used in the ProtoBuf definition.
190        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
191            match value {
192                "COMPARISON_UNSPECIFIED" => Some(Self::Unspecified),
193                "COMPARISON_NATIVE" => Some(Self::Native),
194                "COMPARISON_UNSIGNED_INT64" => Some(Self::UnsignedInt64),
195                _ => None,
196            }
197        }
198    }
199}
200/// Represents a table in external database for CDC scenario
201#[derive(prost_helpers::AnyPB)]
202#[derive(Eq, Hash)]
203#[derive(Clone, PartialEq, ::prost::Message)]
204pub struct ExternalTableDesc {
205    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
206    pub table_id: crate::id::TableId,
207    #[prost(message, repeated, tag = "2")]
208    pub columns: ::prost::alloc::vec::Vec<ColumnDesc>,
209    /// TODO: may refactor primary key representations
210    #[prost(message, repeated, tag = "3")]
211    pub pk: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
212    #[prost(string, tag = "4")]
213    pub table_name: ::prost::alloc::string::String,
214    #[prost(uint32, repeated, tag = "5")]
215    pub stream_key: ::prost::alloc::vec::Vec<u32>,
216    #[prost(btree_map = "string, string", tag = "6")]
217    pub connect_properties: ::prost::alloc::collections::BTreeMap<
218        ::prost::alloc::string::String,
219        ::prost::alloc::string::String,
220    >,
221    /// upstream cdc source job id
222    #[prost(uint32, tag = "7", wrapper = "crate::id::SourceId")]
223    pub source_id: crate::id::SourceId,
224    #[prost(btree_map = "string, message", tag = "8")]
225    pub secret_refs: ::prost::alloc::collections::BTreeMap<
226        ::prost::alloc::string::String,
227        super::secret::SecretRef,
228    >,
229    #[prost(message, optional, tag = "9")]
230    pub pk_ordering: ::core::option::Option<CdcKeyOrdering>,
231}
232#[derive(prost_helpers::AnyPB)]
233#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
234pub struct AsOfJoinDesc {
235    /// The index of the right side's as of column.
236    #[prost(uint32, tag = "1")]
237    pub right_idx: u32,
238    /// The index of the left side's as of column.
239    #[prost(uint32, tag = "2")]
240    pub left_idx: u32,
241    /// The type of the inequality.
242    #[prost(enumeration = "AsOfJoinInequalityType", tag = "3")]
243    pub inequality_type: i32,
244}
245#[derive(prost_helpers::AnyPB)]
246#[derive(Clone, PartialEq, ::prost::Message)]
247pub struct IndexAndExpr {
248    #[prost(uint32, tag = "1")]
249    pub index: u32,
250    #[prost(message, optional, tag = "2")]
251    pub expr: ::core::option::Option<super::expr::ExprNode>,
252}
253#[derive(prost_helpers::AnyPB)]
254#[derive(Clone, PartialEq, ::prost::Message)]
255pub struct DefaultColumns {
256    #[prost(message, repeated, tag = "1")]
257    pub default_columns: ::prost::alloc::vec::Vec<IndexAndExpr>,
258}
259/// The cardinality of the output rows of a plan node. Bounds are inclusive.
260#[derive(prost_helpers::AnyPB)]
261#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
262pub struct Cardinality {
263    #[prost(uint64, tag = "1")]
264    pub lo: u64,
265    /// Unbounded if not set.
266    #[prost(uint64, optional, tag = "2")]
267    pub hi: ::core::option::Option<u64>,
268}
269/// Provide statement-local context, e.g. session info like time zone, for execution.
270#[derive(prost_helpers::AnyPB)]
271#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
272pub struct ExprContext {
273    #[prost(string, tag = "1")]
274    pub time_zone: ::prost::alloc::string::String,
275    #[prost(bool, tag = "2")]
276    pub strict_mode: bool,
277}
278#[derive(prost_helpers::AnyPB)]
279#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
280pub struct AdditionalColumnKey {}
281#[derive(prost_helpers::AnyPB)]
282#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
283pub struct AdditionalColumnTimestamp {}
284#[derive(prost_helpers::AnyPB)]
285#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
286pub struct AdditionalColumnPartition {}
287#[derive(prost_helpers::AnyPB)]
288#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
289pub struct AdditionalColumnOffset {}
290#[derive(prost_helpers::AnyPB)]
291#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
292pub struct AdditionalColumnFilename {}
293#[derive(prost_helpers::AnyPB)]
294#[derive(Eq, Hash)]
295#[derive(Clone, PartialEq, ::prost::Message)]
296pub struct AdditionalColumnHeader {
297    #[prost(string, tag = "1")]
298    pub inner_field: ::prost::alloc::string::String,
299    #[prost(message, optional, tag = "2")]
300    pub data_type: ::core::option::Option<super::data::DataType>,
301}
302/// metadata column for cdc table
303#[derive(prost_helpers::AnyPB)]
304#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
305pub struct AdditionalDatabaseName {}
306#[derive(prost_helpers::AnyPB)]
307#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
308pub struct AdditionalSchemaName {}
309#[derive(prost_helpers::AnyPB)]
310#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
311pub struct AdditionalTableName {}
312#[derive(prost_helpers::AnyPB)]
313#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
314pub struct AdditionalCollectionName {}
315#[derive(prost_helpers::AnyPB)]
316#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
317pub struct AdditionalColumnPayload {}
318/// this type means we read all headers as a whole
319#[derive(prost_helpers::AnyPB)]
320#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
321pub struct AdditionalColumnHeaders {}
322#[derive(prost_helpers::AnyPB)]
323#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
324pub struct AdditionalSubject {}
325#[derive(prost_helpers::AnyPB)]
326#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
327pub struct AdditionalColumnPulsarMessageIdData {}
328#[derive(prost_helpers::AnyPB)]
329#[derive(Eq, Hash)]
330#[derive(Clone, PartialEq, ::prost::Message)]
331pub struct AdditionalColumn {
332    #[prost(
333        oneof = "additional_column::ColumnType",
334        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14"
335    )]
336    pub column_type: ::core::option::Option<additional_column::ColumnType>,
337}
338/// Nested message and enum types in `AdditionalColumn`.
339pub mod additional_column {
340    #[derive(prost_helpers::AnyPB)]
341    #[derive(Eq, Hash)]
342    #[derive(Clone, PartialEq, ::prost::Oneof)]
343    pub enum ColumnType {
344        #[prost(message, tag = "1")]
345        Key(super::AdditionalColumnKey),
346        #[prost(message, tag = "2")]
347        Timestamp(super::AdditionalColumnTimestamp),
348        #[prost(message, tag = "3")]
349        Partition(super::AdditionalColumnPartition),
350        #[prost(message, tag = "4")]
351        Offset(super::AdditionalColumnOffset),
352        #[prost(message, tag = "5")]
353        HeaderInner(super::AdditionalColumnHeader),
354        #[prost(message, tag = "6")]
355        Filename(super::AdditionalColumnFilename),
356        #[prost(message, tag = "7")]
357        Headers(super::AdditionalColumnHeaders),
358        #[prost(message, tag = "8")]
359        DatabaseName(super::AdditionalDatabaseName),
360        #[prost(message, tag = "9")]
361        SchemaName(super::AdditionalSchemaName),
362        #[prost(message, tag = "10")]
363        TableName(super::AdditionalTableName),
364        #[prost(message, tag = "11")]
365        CollectionName(super::AdditionalCollectionName),
366        #[prost(message, tag = "12")]
367        Payload(super::AdditionalColumnPayload),
368        #[prost(message, tag = "13")]
369        Subject(super::AdditionalSubject),
370        #[prost(message, tag = "14")]
371        PulsarMessageIdData(super::AdditionalColumnPulsarMessageIdData),
372    }
373}
374#[derive(prost_helpers::AnyPB)]
375#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
376pub struct SourceRefreshMode {
377    #[prost(oneof = "source_refresh_mode::RefreshMode", tags = "1, 2")]
378    pub refresh_mode: ::core::option::Option<source_refresh_mode::RefreshMode>,
379}
380/// Nested message and enum types in `SourceRefreshMode`.
381pub mod source_refresh_mode {
382    #[derive(prost_helpers::AnyPB)]
383    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
384    pub struct SourceRefreshModeStreaming {}
385    #[derive(prost_helpers::AnyPB)]
386    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
387    pub struct SourceRefreshModeFullReload {
388        #[prost(int64, optional, tag = "1")]
389        pub refresh_interval_sec: ::core::option::Option<i64>,
390    }
391    #[derive(prost_helpers::AnyPB)]
392    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
393    pub enum RefreshMode {
394        #[prost(message, tag = "1")]
395        Streaming(SourceRefreshModeStreaming),
396        #[prost(message, tag = "2")]
397        FullReload(SourceRefreshModeFullReload),
398    }
399}
400#[derive(prost_helpers::AnyPB)]
401#[derive(prost_helpers::Version)]
402#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
403#[repr(i32)]
404pub enum ColumnDescVersion {
405    Unspecified = 0,
406    /// Introduced in <https://github.com/risingwavelabs/risingwave/pull/13707#discussion_r1429947537,>
407    /// in case DEFAULT_KEY_COLUMN_NAME changes
408    Pr13707 = 1,
409}
410impl ColumnDescVersion {
411    /// String value of the enum field names used in the ProtoBuf definition.
412    ///
413    /// The values are not transformed in any way and thus are considered stable
414    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
415    pub fn as_str_name(&self) -> &'static str {
416        match self {
417            Self::Unspecified => "COLUMN_DESC_VERSION_UNSPECIFIED",
418            Self::Pr13707 => "COLUMN_DESC_VERSION_PR_13707",
419        }
420    }
421    /// Creates an enum from field names used in the ProtoBuf definition.
422    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
423        match value {
424            "COLUMN_DESC_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
425            "COLUMN_DESC_VERSION_PR_13707" => Some(Self::Pr13707),
426            _ => None,
427        }
428    }
429}
430#[derive(prost_helpers::AnyPB)]
431#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
432#[repr(i32)]
433pub enum JoinType {
434    /// Note that it comes from Calcite's JoinRelType.
435    /// DO NOT HAVE direction for SEMI and ANTI now.
436    Unspecified = 0,
437    Inner = 1,
438    LeftOuter = 2,
439    RightOuter = 3,
440    FullOuter = 4,
441    LeftSemi = 5,
442    LeftAnti = 6,
443    RightSemi = 7,
444    RightAnti = 8,
445    AsofInner = 9,
446    AsofLeftOuter = 10,
447}
448impl JoinType {
449    /// String value of the enum field names used in the ProtoBuf definition.
450    ///
451    /// The values are not transformed in any way and thus are considered stable
452    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
453    pub fn as_str_name(&self) -> &'static str {
454        match self {
455            Self::Unspecified => "JOIN_TYPE_UNSPECIFIED",
456            Self::Inner => "JOIN_TYPE_INNER",
457            Self::LeftOuter => "JOIN_TYPE_LEFT_OUTER",
458            Self::RightOuter => "JOIN_TYPE_RIGHT_OUTER",
459            Self::FullOuter => "JOIN_TYPE_FULL_OUTER",
460            Self::LeftSemi => "JOIN_TYPE_LEFT_SEMI",
461            Self::LeftAnti => "JOIN_TYPE_LEFT_ANTI",
462            Self::RightSemi => "JOIN_TYPE_RIGHT_SEMI",
463            Self::RightAnti => "JOIN_TYPE_RIGHT_ANTI",
464            Self::AsofInner => "JOIN_TYPE_ASOF_INNER",
465            Self::AsofLeftOuter => "JOIN_TYPE_ASOF_LEFT_OUTER",
466        }
467    }
468    /// Creates an enum from field names used in the ProtoBuf definition.
469    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
470        match value {
471            "JOIN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
472            "JOIN_TYPE_INNER" => Some(Self::Inner),
473            "JOIN_TYPE_LEFT_OUTER" => Some(Self::LeftOuter),
474            "JOIN_TYPE_RIGHT_OUTER" => Some(Self::RightOuter),
475            "JOIN_TYPE_FULL_OUTER" => Some(Self::FullOuter),
476            "JOIN_TYPE_LEFT_SEMI" => Some(Self::LeftSemi),
477            "JOIN_TYPE_LEFT_ANTI" => Some(Self::LeftAnti),
478            "JOIN_TYPE_RIGHT_SEMI" => Some(Self::RightSemi),
479            "JOIN_TYPE_RIGHT_ANTI" => Some(Self::RightAnti),
480            "JOIN_TYPE_ASOF_INNER" => Some(Self::AsofInner),
481            "JOIN_TYPE_ASOF_LEFT_OUTER" => Some(Self::AsofLeftOuter),
482            _ => None,
483        }
484    }
485}
486#[derive(prost_helpers::AnyPB)]
487#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
488#[repr(i32)]
489pub enum AsOfJoinType {
490    Unspecified = 0,
491    Inner = 1,
492    LeftOuter = 2,
493}
494impl AsOfJoinType {
495    /// String value of the enum field names used in the ProtoBuf definition.
496    ///
497    /// The values are not transformed in any way and thus are considered stable
498    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
499    pub fn as_str_name(&self) -> &'static str {
500        match self {
501            Self::Unspecified => "AS_OF_JOIN_TYPE_UNSPECIFIED",
502            Self::Inner => "AS_OF_JOIN_TYPE_INNER",
503            Self::LeftOuter => "AS_OF_JOIN_TYPE_LEFT_OUTER",
504        }
505    }
506    /// Creates an enum from field names used in the ProtoBuf definition.
507    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
508        match value {
509            "AS_OF_JOIN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
510            "AS_OF_JOIN_TYPE_INNER" => Some(Self::Inner),
511            "AS_OF_JOIN_TYPE_LEFT_OUTER" => Some(Self::LeftOuter),
512            _ => None,
513        }
514    }
515}
516#[derive(prost_helpers::AnyPB)]
517#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
518#[repr(i32)]
519pub enum AsOfJoinInequalityType {
520    AsOfInequalityTypeUnspecified = 0,
521    AsOfInequalityTypeGt = 1,
522    AsOfInequalityTypeGe = 2,
523    AsOfInequalityTypeLt = 3,
524    AsOfInequalityTypeLe = 4,
525}
526impl AsOfJoinInequalityType {
527    /// String value of the enum field names used in the ProtoBuf definition.
528    ///
529    /// The values are not transformed in any way and thus are considered stable
530    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
531    pub fn as_str_name(&self) -> &'static str {
532        match self {
533            Self::AsOfInequalityTypeUnspecified => "AS_OF_INEQUALITY_TYPE_UNSPECIFIED",
534            Self::AsOfInequalityTypeGt => "AS_OF_INEQUALITY_TYPE_GT",
535            Self::AsOfInequalityTypeGe => "AS_OF_INEQUALITY_TYPE_GE",
536            Self::AsOfInequalityTypeLt => "AS_OF_INEQUALITY_TYPE_LT",
537            Self::AsOfInequalityTypeLe => "AS_OF_INEQUALITY_TYPE_LE",
538        }
539    }
540    /// Creates an enum from field names used in the ProtoBuf definition.
541    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
542        match value {
543            "AS_OF_INEQUALITY_TYPE_UNSPECIFIED" => {
544                Some(Self::AsOfInequalityTypeUnspecified)
545            }
546            "AS_OF_INEQUALITY_TYPE_GT" => Some(Self::AsOfInequalityTypeGt),
547            "AS_OF_INEQUALITY_TYPE_GE" => Some(Self::AsOfInequalityTypeGe),
548            "AS_OF_INEQUALITY_TYPE_LT" => Some(Self::AsOfInequalityTypeLt),
549            "AS_OF_INEQUALITY_TYPE_LE" => Some(Self::AsOfInequalityTypeLe),
550            _ => None,
551        }
552    }
553}
554/// <https://github.com/tokio-rs/prost/issues/80>
555#[derive(prost_helpers::AnyPB)]
556#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
557#[repr(i32)]
558pub enum FormatType {
559    Unspecified = 0,
560    Native = 1,
561    Debezium = 2,
562    DebeziumMongo = 3,
563    Maxwell = 4,
564    Canal = 5,
565    Upsert = 6,
566    Plain = 7,
567    None = 8,
568}
569impl FormatType {
570    /// String value of the enum field names used in the ProtoBuf definition.
571    ///
572    /// The values are not transformed in any way and thus are considered stable
573    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
574    pub fn as_str_name(&self) -> &'static str {
575        match self {
576            Self::Unspecified => "FORMAT_TYPE_UNSPECIFIED",
577            Self::Native => "FORMAT_TYPE_NATIVE",
578            Self::Debezium => "FORMAT_TYPE_DEBEZIUM",
579            Self::DebeziumMongo => "FORMAT_TYPE_DEBEZIUM_MONGO",
580            Self::Maxwell => "FORMAT_TYPE_MAXWELL",
581            Self::Canal => "FORMAT_TYPE_CANAL",
582            Self::Upsert => "FORMAT_TYPE_UPSERT",
583            Self::Plain => "FORMAT_TYPE_PLAIN",
584            Self::None => "FORMAT_TYPE_NONE",
585        }
586    }
587    /// Creates an enum from field names used in the ProtoBuf definition.
588    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
589        match value {
590            "FORMAT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
591            "FORMAT_TYPE_NATIVE" => Some(Self::Native),
592            "FORMAT_TYPE_DEBEZIUM" => Some(Self::Debezium),
593            "FORMAT_TYPE_DEBEZIUM_MONGO" => Some(Self::DebeziumMongo),
594            "FORMAT_TYPE_MAXWELL" => Some(Self::Maxwell),
595            "FORMAT_TYPE_CANAL" => Some(Self::Canal),
596            "FORMAT_TYPE_UPSERT" => Some(Self::Upsert),
597            "FORMAT_TYPE_PLAIN" => Some(Self::Plain),
598            "FORMAT_TYPE_NONE" => Some(Self::None),
599            _ => None,
600        }
601    }
602}
603#[derive(prost_helpers::AnyPB)]
604#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
605#[repr(i32)]
606pub enum EncodeType {
607    Unspecified = 0,
608    Native = 1,
609    Avro = 2,
610    Csv = 3,
611    Protobuf = 4,
612    Json = 5,
613    Bytes = 6,
614    Template = 7,
615    None = 8,
616    Text = 9,
617    Parquet = 10,
618}
619impl EncodeType {
620    /// String value of the enum field names used in the ProtoBuf definition.
621    ///
622    /// The values are not transformed in any way and thus are considered stable
623    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
624    pub fn as_str_name(&self) -> &'static str {
625        match self {
626            Self::Unspecified => "ENCODE_TYPE_UNSPECIFIED",
627            Self::Native => "ENCODE_TYPE_NATIVE",
628            Self::Avro => "ENCODE_TYPE_AVRO",
629            Self::Csv => "ENCODE_TYPE_CSV",
630            Self::Protobuf => "ENCODE_TYPE_PROTOBUF",
631            Self::Json => "ENCODE_TYPE_JSON",
632            Self::Bytes => "ENCODE_TYPE_BYTES",
633            Self::Template => "ENCODE_TYPE_TEMPLATE",
634            Self::None => "ENCODE_TYPE_NONE",
635            Self::Text => "ENCODE_TYPE_TEXT",
636            Self::Parquet => "ENCODE_TYPE_PARQUET",
637        }
638    }
639    /// Creates an enum from field names used in the ProtoBuf definition.
640    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
641        match value {
642            "ENCODE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
643            "ENCODE_TYPE_NATIVE" => Some(Self::Native),
644            "ENCODE_TYPE_AVRO" => Some(Self::Avro),
645            "ENCODE_TYPE_CSV" => Some(Self::Csv),
646            "ENCODE_TYPE_PROTOBUF" => Some(Self::Protobuf),
647            "ENCODE_TYPE_JSON" => Some(Self::Json),
648            "ENCODE_TYPE_BYTES" => Some(Self::Bytes),
649            "ENCODE_TYPE_TEMPLATE" => Some(Self::Template),
650            "ENCODE_TYPE_NONE" => Some(Self::None),
651            "ENCODE_TYPE_TEXT" => Some(Self::Text),
652            "ENCODE_TYPE_PARQUET" => Some(Self::Parquet),
653            _ => None,
654        }
655    }
656}
657#[derive(prost_helpers::AnyPB)]
658#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
659#[repr(i32)]
660pub enum RowFormatType {
661    RowUnspecified = 0,
662    Json = 1,
663    Protobuf = 2,
664    DebeziumJson = 3,
665    Avro = 4,
666    Maxwell = 5,
667    CanalJson = 6,
668    Csv = 7,
669    Native = 8,
670    DebeziumAvro = 9,
671    UpsertJson = 10,
672    UpsertAvro = 11,
673    DebeziumMongoJson = 12,
674    Bytes = 13,
675}
676impl RowFormatType {
677    /// String value of the enum field names used in the ProtoBuf definition.
678    ///
679    /// The values are not transformed in any way and thus are considered stable
680    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
681    pub fn as_str_name(&self) -> &'static str {
682        match self {
683            Self::RowUnspecified => "ROW_UNSPECIFIED",
684            Self::Json => "JSON",
685            Self::Protobuf => "PROTOBUF",
686            Self::DebeziumJson => "DEBEZIUM_JSON",
687            Self::Avro => "AVRO",
688            Self::Maxwell => "MAXWELL",
689            Self::CanalJson => "CANAL_JSON",
690            Self::Csv => "CSV",
691            Self::Native => "NATIVE",
692            Self::DebeziumAvro => "DEBEZIUM_AVRO",
693            Self::UpsertJson => "UPSERT_JSON",
694            Self::UpsertAvro => "UPSERT_AVRO",
695            Self::DebeziumMongoJson => "DEBEZIUM_MONGO_JSON",
696            Self::Bytes => "BYTES",
697        }
698    }
699    /// Creates an enum from field names used in the ProtoBuf definition.
700    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
701        match value {
702            "ROW_UNSPECIFIED" => Some(Self::RowUnspecified),
703            "JSON" => Some(Self::Json),
704            "PROTOBUF" => Some(Self::Protobuf),
705            "DEBEZIUM_JSON" => Some(Self::DebeziumJson),
706            "AVRO" => Some(Self::Avro),
707            "MAXWELL" => Some(Self::Maxwell),
708            "CANAL_JSON" => Some(Self::CanalJson),
709            "CSV" => Some(Self::Csv),
710            "NATIVE" => Some(Self::Native),
711            "DEBEZIUM_AVRO" => Some(Self::DebeziumAvro),
712            "UPSERT_JSON" => Some(Self::UpsertJson),
713            "UPSERT_AVRO" => Some(Self::UpsertAvro),
714            "DEBEZIUM_MONGO_JSON" => Some(Self::DebeziumMongoJson),
715            "BYTES" => Some(Self::Bytes),
716            _ => None,
717        }
718    }
719}
720#[derive(prost_helpers::AnyPB)]
721#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
722#[repr(i32)]
723pub enum AdditionalColumnType {
724    Unspecified = 0,
725    Key = 1,
726    Timestamp = 2,
727    Partition = 3,
728    Offset = 4,
729    Header = 5,
730    Filename = 6,
731    Normal = 7,
732    Payload = 8,
733    /// for pulsar source, used for ack message
734    PulsarMessageIdData = 9,
735}
736impl AdditionalColumnType {
737    /// String value of the enum field names used in the ProtoBuf definition.
738    ///
739    /// The values are not transformed in any way and thus are considered stable
740    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
741    pub fn as_str_name(&self) -> &'static str {
742        match self {
743            Self::Unspecified => "ADDITIONAL_COLUMN_TYPE_UNSPECIFIED",
744            Self::Key => "ADDITIONAL_COLUMN_TYPE_KEY",
745            Self::Timestamp => "ADDITIONAL_COLUMN_TYPE_TIMESTAMP",
746            Self::Partition => "ADDITIONAL_COLUMN_TYPE_PARTITION",
747            Self::Offset => "ADDITIONAL_COLUMN_TYPE_OFFSET",
748            Self::Header => "ADDITIONAL_COLUMN_TYPE_HEADER",
749            Self::Filename => "ADDITIONAL_COLUMN_TYPE_FILENAME",
750            Self::Normal => "ADDITIONAL_COLUMN_TYPE_NORMAL",
751            Self::Payload => "ADDITIONAL_COLUMN_TYPE_PAYLOAD",
752            Self::PulsarMessageIdData => "ADDITIONAL_COLUMN_TYPE_PULSAR_MESSAGE_ID_DATA",
753        }
754    }
755    /// Creates an enum from field names used in the ProtoBuf definition.
756    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
757        match value {
758            "ADDITIONAL_COLUMN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
759            "ADDITIONAL_COLUMN_TYPE_KEY" => Some(Self::Key),
760            "ADDITIONAL_COLUMN_TYPE_TIMESTAMP" => Some(Self::Timestamp),
761            "ADDITIONAL_COLUMN_TYPE_PARTITION" => Some(Self::Partition),
762            "ADDITIONAL_COLUMN_TYPE_OFFSET" => Some(Self::Offset),
763            "ADDITIONAL_COLUMN_TYPE_HEADER" => Some(Self::Header),
764            "ADDITIONAL_COLUMN_TYPE_FILENAME" => Some(Self::Filename),
765            "ADDITIONAL_COLUMN_TYPE_NORMAL" => Some(Self::Normal),
766            "ADDITIONAL_COLUMN_TYPE_PAYLOAD" => Some(Self::Payload),
767            "ADDITIONAL_COLUMN_TYPE_PULSAR_MESSAGE_ID_DATA" => {
768                Some(Self::PulsarMessageIdData)
769            }
770            _ => None,
771        }
772    }
773}