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/// Represents a table in external database for CDC scenario
143#[derive(prost_helpers::AnyPB)]
144#[derive(Eq, Hash)]
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct ExternalTableDesc {
147    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
148    pub table_id: crate::id::TableId,
149    #[prost(message, repeated, tag = "2")]
150    pub columns: ::prost::alloc::vec::Vec<ColumnDesc>,
151    /// TODO: may refactor primary key representations
152    #[prost(message, repeated, tag = "3")]
153    pub pk: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
154    #[prost(string, tag = "4")]
155    pub table_name: ::prost::alloc::string::String,
156    #[prost(uint32, repeated, tag = "5")]
157    pub stream_key: ::prost::alloc::vec::Vec<u32>,
158    #[prost(btree_map = "string, string", tag = "6")]
159    pub connect_properties: ::prost::alloc::collections::BTreeMap<
160        ::prost::alloc::string::String,
161        ::prost::alloc::string::String,
162    >,
163    /// upstream cdc source job id
164    #[prost(uint32, tag = "7", wrapper = "crate::id::SourceId")]
165    pub source_id: crate::id::SourceId,
166    #[prost(btree_map = "string, message", tag = "8")]
167    pub secret_refs: ::prost::alloc::collections::BTreeMap<
168        ::prost::alloc::string::String,
169        super::secret::SecretRef,
170    >,
171}
172#[derive(prost_helpers::AnyPB)]
173#[derive(Eq, Hash)]
174#[derive(Clone, Copy, PartialEq, ::prost::Message)]
175pub struct AsOfJoinDesc {
176    /// The index of the right side's as of column.
177    #[prost(uint32, tag = "1")]
178    pub right_idx: u32,
179    /// The index of the left side's as of column.
180    #[prost(uint32, tag = "2")]
181    pub left_idx: u32,
182    /// The type of the inequality.
183    #[prost(enumeration = "AsOfJoinInequalityType", tag = "3")]
184    pub inequality_type: i32,
185}
186#[derive(prost_helpers::AnyPB)]
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct IndexAndExpr {
189    #[prost(uint32, tag = "1")]
190    pub index: u32,
191    #[prost(message, optional, tag = "2")]
192    pub expr: ::core::option::Option<super::expr::ExprNode>,
193}
194#[derive(prost_helpers::AnyPB)]
195#[derive(Clone, PartialEq, ::prost::Message)]
196pub struct DefaultColumns {
197    #[prost(message, repeated, tag = "1")]
198    pub default_columns: ::prost::alloc::vec::Vec<IndexAndExpr>,
199}
200/// The cardinality of the output rows of a plan node. Bounds are inclusive.
201#[derive(prost_helpers::AnyPB)]
202#[derive(Eq, Hash)]
203#[derive(Clone, Copy, PartialEq, ::prost::Message)]
204pub struct Cardinality {
205    #[prost(uint64, tag = "1")]
206    pub lo: u64,
207    /// Unbounded if not set.
208    #[prost(uint64, optional, tag = "2")]
209    pub hi: ::core::option::Option<u64>,
210}
211/// Provide statement-local context, e.g. session info like time zone, for execution.
212#[derive(prost_helpers::AnyPB)]
213#[derive(Clone, PartialEq, ::prost::Message)]
214pub struct ExprContext {
215    #[prost(string, tag = "1")]
216    pub time_zone: ::prost::alloc::string::String,
217    #[prost(bool, tag = "2")]
218    pub strict_mode: bool,
219}
220#[derive(prost_helpers::AnyPB)]
221#[derive(Eq, Hash)]
222#[derive(Clone, Copy, PartialEq, ::prost::Message)]
223pub struct AdditionalColumnKey {}
224#[derive(prost_helpers::AnyPB)]
225#[derive(Eq, Hash)]
226#[derive(Clone, Copy, PartialEq, ::prost::Message)]
227pub struct AdditionalColumnTimestamp {}
228#[derive(prost_helpers::AnyPB)]
229#[derive(Eq, Hash)]
230#[derive(Clone, Copy, PartialEq, ::prost::Message)]
231pub struct AdditionalColumnPartition {}
232#[derive(prost_helpers::AnyPB)]
233#[derive(Eq, Hash)]
234#[derive(Clone, Copy, PartialEq, ::prost::Message)]
235pub struct AdditionalColumnOffset {}
236#[derive(prost_helpers::AnyPB)]
237#[derive(Eq, Hash)]
238#[derive(Clone, Copy, PartialEq, ::prost::Message)]
239pub struct AdditionalColumnFilename {}
240#[derive(prost_helpers::AnyPB)]
241#[derive(Eq, Hash)]
242#[derive(Clone, PartialEq, ::prost::Message)]
243pub struct AdditionalColumnHeader {
244    #[prost(string, tag = "1")]
245    pub inner_field: ::prost::alloc::string::String,
246    #[prost(message, optional, tag = "2")]
247    pub data_type: ::core::option::Option<super::data::DataType>,
248}
249/// metadata column for cdc table
250#[derive(prost_helpers::AnyPB)]
251#[derive(Eq, Hash)]
252#[derive(Clone, Copy, PartialEq, ::prost::Message)]
253pub struct AdditionalDatabaseName {}
254#[derive(prost_helpers::AnyPB)]
255#[derive(Eq, Hash)]
256#[derive(Clone, Copy, PartialEq, ::prost::Message)]
257pub struct AdditionalSchemaName {}
258#[derive(prost_helpers::AnyPB)]
259#[derive(Eq, Hash)]
260#[derive(Clone, Copy, PartialEq, ::prost::Message)]
261pub struct AdditionalTableName {}
262#[derive(prost_helpers::AnyPB)]
263#[derive(Eq, Hash)]
264#[derive(Clone, Copy, PartialEq, ::prost::Message)]
265pub struct AdditionalCollectionName {}
266#[derive(prost_helpers::AnyPB)]
267#[derive(Eq, Hash)]
268#[derive(Clone, Copy, PartialEq, ::prost::Message)]
269pub struct AdditionalColumnPayload {}
270/// this type means we read all headers as a whole
271#[derive(prost_helpers::AnyPB)]
272#[derive(Eq, Hash)]
273#[derive(Clone, Copy, PartialEq, ::prost::Message)]
274pub struct AdditionalColumnHeaders {}
275#[derive(prost_helpers::AnyPB)]
276#[derive(Eq, Hash)]
277#[derive(Clone, Copy, PartialEq, ::prost::Message)]
278pub struct AdditionalSubject {}
279#[derive(prost_helpers::AnyPB)]
280#[derive(Eq, Hash)]
281#[derive(Clone, Copy, PartialEq, ::prost::Message)]
282pub struct AdditionalColumnPulsarMessageIdData {}
283#[derive(prost_helpers::AnyPB)]
284#[derive(Eq, Hash)]
285#[derive(Clone, PartialEq, ::prost::Message)]
286pub struct AdditionalColumn {
287    #[prost(
288        oneof = "additional_column::ColumnType",
289        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14"
290    )]
291    pub column_type: ::core::option::Option<additional_column::ColumnType>,
292}
293/// Nested message and enum types in `AdditionalColumn`.
294pub mod additional_column {
295    #[derive(prost_helpers::AnyPB)]
296    #[derive(Eq, Hash)]
297    #[derive(Clone, PartialEq, ::prost::Oneof)]
298    pub enum ColumnType {
299        #[prost(message, tag = "1")]
300        Key(super::AdditionalColumnKey),
301        #[prost(message, tag = "2")]
302        Timestamp(super::AdditionalColumnTimestamp),
303        #[prost(message, tag = "3")]
304        Partition(super::AdditionalColumnPartition),
305        #[prost(message, tag = "4")]
306        Offset(super::AdditionalColumnOffset),
307        #[prost(message, tag = "5")]
308        HeaderInner(super::AdditionalColumnHeader),
309        #[prost(message, tag = "6")]
310        Filename(super::AdditionalColumnFilename),
311        #[prost(message, tag = "7")]
312        Headers(super::AdditionalColumnHeaders),
313        #[prost(message, tag = "8")]
314        DatabaseName(super::AdditionalDatabaseName),
315        #[prost(message, tag = "9")]
316        SchemaName(super::AdditionalSchemaName),
317        #[prost(message, tag = "10")]
318        TableName(super::AdditionalTableName),
319        #[prost(message, tag = "11")]
320        CollectionName(super::AdditionalCollectionName),
321        #[prost(message, tag = "12")]
322        Payload(super::AdditionalColumnPayload),
323        #[prost(message, tag = "13")]
324        Subject(super::AdditionalSubject),
325        #[prost(message, tag = "14")]
326        PulsarMessageIdData(super::AdditionalColumnPulsarMessageIdData),
327    }
328}
329#[derive(prost_helpers::AnyPB)]
330#[derive(Eq, Hash)]
331#[derive(Clone, Copy, PartialEq, ::prost::Message)]
332pub struct SourceRefreshMode {
333    #[prost(oneof = "source_refresh_mode::RefreshMode", tags = "1, 2")]
334    pub refresh_mode: ::core::option::Option<source_refresh_mode::RefreshMode>,
335}
336/// Nested message and enum types in `SourceRefreshMode`.
337pub mod source_refresh_mode {
338    #[derive(prost_helpers::AnyPB)]
339    #[derive(Eq, Hash)]
340    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
341    pub struct SourceRefreshModeStreaming {}
342    #[derive(prost_helpers::AnyPB)]
343    #[derive(Eq, Hash)]
344    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
345    pub struct SourceRefreshModeFullReload {
346        #[prost(int64, optional, tag = "1")]
347        pub refresh_interval_sec: ::core::option::Option<i64>,
348    }
349    #[derive(prost_helpers::AnyPB)]
350    #[derive(Eq, Hash)]
351    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
352    pub enum RefreshMode {
353        #[prost(message, tag = "1")]
354        Streaming(SourceRefreshModeStreaming),
355        #[prost(message, tag = "2")]
356        FullReload(SourceRefreshModeFullReload),
357    }
358}
359#[derive(prost_helpers::AnyPB)]
360#[derive(prost_helpers::Version)]
361#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
362#[repr(i32)]
363pub enum ColumnDescVersion {
364    Unspecified = 0,
365    /// Introduced in <https://github.com/risingwavelabs/risingwave/pull/13707#discussion_r1429947537,>
366    /// in case DEFAULT_KEY_COLUMN_NAME changes
367    Pr13707 = 1,
368}
369impl ColumnDescVersion {
370    /// String value of the enum field names used in the ProtoBuf definition.
371    ///
372    /// The values are not transformed in any way and thus are considered stable
373    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
374    pub fn as_str_name(&self) -> &'static str {
375        match self {
376            Self::Unspecified => "COLUMN_DESC_VERSION_UNSPECIFIED",
377            Self::Pr13707 => "COLUMN_DESC_VERSION_PR_13707",
378        }
379    }
380    /// Creates an enum from field names used in the ProtoBuf definition.
381    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
382        match value {
383            "COLUMN_DESC_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
384            "COLUMN_DESC_VERSION_PR_13707" => Some(Self::Pr13707),
385            _ => None,
386        }
387    }
388}
389#[derive(prost_helpers::AnyPB)]
390#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
391#[repr(i32)]
392pub enum JoinType {
393    /// Note that it comes from Calcite's JoinRelType.
394    /// DO NOT HAVE direction for SEMI and ANTI now.
395    Unspecified = 0,
396    Inner = 1,
397    LeftOuter = 2,
398    RightOuter = 3,
399    FullOuter = 4,
400    LeftSemi = 5,
401    LeftAnti = 6,
402    RightSemi = 7,
403    RightAnti = 8,
404    AsofInner = 9,
405    AsofLeftOuter = 10,
406}
407impl JoinType {
408    /// String value of the enum field names used in the ProtoBuf definition.
409    ///
410    /// The values are not transformed in any way and thus are considered stable
411    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
412    pub fn as_str_name(&self) -> &'static str {
413        match self {
414            Self::Unspecified => "JOIN_TYPE_UNSPECIFIED",
415            Self::Inner => "JOIN_TYPE_INNER",
416            Self::LeftOuter => "JOIN_TYPE_LEFT_OUTER",
417            Self::RightOuter => "JOIN_TYPE_RIGHT_OUTER",
418            Self::FullOuter => "JOIN_TYPE_FULL_OUTER",
419            Self::LeftSemi => "JOIN_TYPE_LEFT_SEMI",
420            Self::LeftAnti => "JOIN_TYPE_LEFT_ANTI",
421            Self::RightSemi => "JOIN_TYPE_RIGHT_SEMI",
422            Self::RightAnti => "JOIN_TYPE_RIGHT_ANTI",
423            Self::AsofInner => "JOIN_TYPE_ASOF_INNER",
424            Self::AsofLeftOuter => "JOIN_TYPE_ASOF_LEFT_OUTER",
425        }
426    }
427    /// Creates an enum from field names used in the ProtoBuf definition.
428    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
429        match value {
430            "JOIN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
431            "JOIN_TYPE_INNER" => Some(Self::Inner),
432            "JOIN_TYPE_LEFT_OUTER" => Some(Self::LeftOuter),
433            "JOIN_TYPE_RIGHT_OUTER" => Some(Self::RightOuter),
434            "JOIN_TYPE_FULL_OUTER" => Some(Self::FullOuter),
435            "JOIN_TYPE_LEFT_SEMI" => Some(Self::LeftSemi),
436            "JOIN_TYPE_LEFT_ANTI" => Some(Self::LeftAnti),
437            "JOIN_TYPE_RIGHT_SEMI" => Some(Self::RightSemi),
438            "JOIN_TYPE_RIGHT_ANTI" => Some(Self::RightAnti),
439            "JOIN_TYPE_ASOF_INNER" => Some(Self::AsofInner),
440            "JOIN_TYPE_ASOF_LEFT_OUTER" => Some(Self::AsofLeftOuter),
441            _ => None,
442        }
443    }
444}
445#[derive(prost_helpers::AnyPB)]
446#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
447#[repr(i32)]
448pub enum AsOfJoinType {
449    Unspecified = 0,
450    Inner = 1,
451    LeftOuter = 2,
452}
453impl AsOfJoinType {
454    /// String value of the enum field names used in the ProtoBuf definition.
455    ///
456    /// The values are not transformed in any way and thus are considered stable
457    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
458    pub fn as_str_name(&self) -> &'static str {
459        match self {
460            Self::Unspecified => "AS_OF_JOIN_TYPE_UNSPECIFIED",
461            Self::Inner => "AS_OF_JOIN_TYPE_INNER",
462            Self::LeftOuter => "AS_OF_JOIN_TYPE_LEFT_OUTER",
463        }
464    }
465    /// Creates an enum from field names used in the ProtoBuf definition.
466    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
467        match value {
468            "AS_OF_JOIN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
469            "AS_OF_JOIN_TYPE_INNER" => Some(Self::Inner),
470            "AS_OF_JOIN_TYPE_LEFT_OUTER" => Some(Self::LeftOuter),
471            _ => None,
472        }
473    }
474}
475#[derive(prost_helpers::AnyPB)]
476#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
477#[repr(i32)]
478pub enum AsOfJoinInequalityType {
479    AsOfInequalityTypeUnspecified = 0,
480    AsOfInequalityTypeGt = 1,
481    AsOfInequalityTypeGe = 2,
482    AsOfInequalityTypeLt = 3,
483    AsOfInequalityTypeLe = 4,
484}
485impl AsOfJoinInequalityType {
486    /// String value of the enum field names used in the ProtoBuf definition.
487    ///
488    /// The values are not transformed in any way and thus are considered stable
489    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
490    pub fn as_str_name(&self) -> &'static str {
491        match self {
492            Self::AsOfInequalityTypeUnspecified => "AS_OF_INEQUALITY_TYPE_UNSPECIFIED",
493            Self::AsOfInequalityTypeGt => "AS_OF_INEQUALITY_TYPE_GT",
494            Self::AsOfInequalityTypeGe => "AS_OF_INEQUALITY_TYPE_GE",
495            Self::AsOfInequalityTypeLt => "AS_OF_INEQUALITY_TYPE_LT",
496            Self::AsOfInequalityTypeLe => "AS_OF_INEQUALITY_TYPE_LE",
497        }
498    }
499    /// Creates an enum from field names used in the ProtoBuf definition.
500    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
501        match value {
502            "AS_OF_INEQUALITY_TYPE_UNSPECIFIED" => {
503                Some(Self::AsOfInequalityTypeUnspecified)
504            }
505            "AS_OF_INEQUALITY_TYPE_GT" => Some(Self::AsOfInequalityTypeGt),
506            "AS_OF_INEQUALITY_TYPE_GE" => Some(Self::AsOfInequalityTypeGe),
507            "AS_OF_INEQUALITY_TYPE_LT" => Some(Self::AsOfInequalityTypeLt),
508            "AS_OF_INEQUALITY_TYPE_LE" => Some(Self::AsOfInequalityTypeLe),
509            _ => None,
510        }
511    }
512}
513/// <https://github.com/tokio-rs/prost/issues/80>
514#[derive(prost_helpers::AnyPB)]
515#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
516#[repr(i32)]
517pub enum FormatType {
518    Unspecified = 0,
519    Native = 1,
520    Debezium = 2,
521    DebeziumMongo = 3,
522    Maxwell = 4,
523    Canal = 5,
524    Upsert = 6,
525    Plain = 7,
526    None = 8,
527}
528impl FormatType {
529    /// String value of the enum field names used in the ProtoBuf definition.
530    ///
531    /// The values are not transformed in any way and thus are considered stable
532    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
533    pub fn as_str_name(&self) -> &'static str {
534        match self {
535            Self::Unspecified => "FORMAT_TYPE_UNSPECIFIED",
536            Self::Native => "FORMAT_TYPE_NATIVE",
537            Self::Debezium => "FORMAT_TYPE_DEBEZIUM",
538            Self::DebeziumMongo => "FORMAT_TYPE_DEBEZIUM_MONGO",
539            Self::Maxwell => "FORMAT_TYPE_MAXWELL",
540            Self::Canal => "FORMAT_TYPE_CANAL",
541            Self::Upsert => "FORMAT_TYPE_UPSERT",
542            Self::Plain => "FORMAT_TYPE_PLAIN",
543            Self::None => "FORMAT_TYPE_NONE",
544        }
545    }
546    /// Creates an enum from field names used in the ProtoBuf definition.
547    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
548        match value {
549            "FORMAT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
550            "FORMAT_TYPE_NATIVE" => Some(Self::Native),
551            "FORMAT_TYPE_DEBEZIUM" => Some(Self::Debezium),
552            "FORMAT_TYPE_DEBEZIUM_MONGO" => Some(Self::DebeziumMongo),
553            "FORMAT_TYPE_MAXWELL" => Some(Self::Maxwell),
554            "FORMAT_TYPE_CANAL" => Some(Self::Canal),
555            "FORMAT_TYPE_UPSERT" => Some(Self::Upsert),
556            "FORMAT_TYPE_PLAIN" => Some(Self::Plain),
557            "FORMAT_TYPE_NONE" => Some(Self::None),
558            _ => None,
559        }
560    }
561}
562#[derive(prost_helpers::AnyPB)]
563#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
564#[repr(i32)]
565pub enum EncodeType {
566    Unspecified = 0,
567    Native = 1,
568    Avro = 2,
569    Csv = 3,
570    Protobuf = 4,
571    Json = 5,
572    Bytes = 6,
573    Template = 7,
574    None = 8,
575    Text = 9,
576    Parquet = 10,
577}
578impl EncodeType {
579    /// String value of the enum field names used in the ProtoBuf definition.
580    ///
581    /// The values are not transformed in any way and thus are considered stable
582    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
583    pub fn as_str_name(&self) -> &'static str {
584        match self {
585            Self::Unspecified => "ENCODE_TYPE_UNSPECIFIED",
586            Self::Native => "ENCODE_TYPE_NATIVE",
587            Self::Avro => "ENCODE_TYPE_AVRO",
588            Self::Csv => "ENCODE_TYPE_CSV",
589            Self::Protobuf => "ENCODE_TYPE_PROTOBUF",
590            Self::Json => "ENCODE_TYPE_JSON",
591            Self::Bytes => "ENCODE_TYPE_BYTES",
592            Self::Template => "ENCODE_TYPE_TEMPLATE",
593            Self::None => "ENCODE_TYPE_NONE",
594            Self::Text => "ENCODE_TYPE_TEXT",
595            Self::Parquet => "ENCODE_TYPE_PARQUET",
596        }
597    }
598    /// Creates an enum from field names used in the ProtoBuf definition.
599    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
600        match value {
601            "ENCODE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
602            "ENCODE_TYPE_NATIVE" => Some(Self::Native),
603            "ENCODE_TYPE_AVRO" => Some(Self::Avro),
604            "ENCODE_TYPE_CSV" => Some(Self::Csv),
605            "ENCODE_TYPE_PROTOBUF" => Some(Self::Protobuf),
606            "ENCODE_TYPE_JSON" => Some(Self::Json),
607            "ENCODE_TYPE_BYTES" => Some(Self::Bytes),
608            "ENCODE_TYPE_TEMPLATE" => Some(Self::Template),
609            "ENCODE_TYPE_NONE" => Some(Self::None),
610            "ENCODE_TYPE_TEXT" => Some(Self::Text),
611            "ENCODE_TYPE_PARQUET" => Some(Self::Parquet),
612            _ => None,
613        }
614    }
615}
616#[derive(prost_helpers::AnyPB)]
617#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
618#[repr(i32)]
619pub enum RowFormatType {
620    RowUnspecified = 0,
621    Json = 1,
622    Protobuf = 2,
623    DebeziumJson = 3,
624    Avro = 4,
625    Maxwell = 5,
626    CanalJson = 6,
627    Csv = 7,
628    Native = 8,
629    DebeziumAvro = 9,
630    UpsertJson = 10,
631    UpsertAvro = 11,
632    DebeziumMongoJson = 12,
633    Bytes = 13,
634}
635impl RowFormatType {
636    /// String value of the enum field names used in the ProtoBuf definition.
637    ///
638    /// The values are not transformed in any way and thus are considered stable
639    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
640    pub fn as_str_name(&self) -> &'static str {
641        match self {
642            Self::RowUnspecified => "ROW_UNSPECIFIED",
643            Self::Json => "JSON",
644            Self::Protobuf => "PROTOBUF",
645            Self::DebeziumJson => "DEBEZIUM_JSON",
646            Self::Avro => "AVRO",
647            Self::Maxwell => "MAXWELL",
648            Self::CanalJson => "CANAL_JSON",
649            Self::Csv => "CSV",
650            Self::Native => "NATIVE",
651            Self::DebeziumAvro => "DEBEZIUM_AVRO",
652            Self::UpsertJson => "UPSERT_JSON",
653            Self::UpsertAvro => "UPSERT_AVRO",
654            Self::DebeziumMongoJson => "DEBEZIUM_MONGO_JSON",
655            Self::Bytes => "BYTES",
656        }
657    }
658    /// Creates an enum from field names used in the ProtoBuf definition.
659    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
660        match value {
661            "ROW_UNSPECIFIED" => Some(Self::RowUnspecified),
662            "JSON" => Some(Self::Json),
663            "PROTOBUF" => Some(Self::Protobuf),
664            "DEBEZIUM_JSON" => Some(Self::DebeziumJson),
665            "AVRO" => Some(Self::Avro),
666            "MAXWELL" => Some(Self::Maxwell),
667            "CANAL_JSON" => Some(Self::CanalJson),
668            "CSV" => Some(Self::Csv),
669            "NATIVE" => Some(Self::Native),
670            "DEBEZIUM_AVRO" => Some(Self::DebeziumAvro),
671            "UPSERT_JSON" => Some(Self::UpsertJson),
672            "UPSERT_AVRO" => Some(Self::UpsertAvro),
673            "DEBEZIUM_MONGO_JSON" => Some(Self::DebeziumMongoJson),
674            "BYTES" => Some(Self::Bytes),
675            _ => None,
676        }
677    }
678}
679#[derive(prost_helpers::AnyPB)]
680#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
681#[repr(i32)]
682pub enum AdditionalColumnType {
683    Unspecified = 0,
684    Key = 1,
685    Timestamp = 2,
686    Partition = 3,
687    Offset = 4,
688    Header = 5,
689    Filename = 6,
690    Normal = 7,
691    Payload = 8,
692    /// for pulsar source, used for ack message
693    PulsarMessageIdData = 9,
694}
695impl AdditionalColumnType {
696    /// String value of the enum field names used in the ProtoBuf definition.
697    ///
698    /// The values are not transformed in any way and thus are considered stable
699    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
700    pub fn as_str_name(&self) -> &'static str {
701        match self {
702            Self::Unspecified => "ADDITIONAL_COLUMN_TYPE_UNSPECIFIED",
703            Self::Key => "ADDITIONAL_COLUMN_TYPE_KEY",
704            Self::Timestamp => "ADDITIONAL_COLUMN_TYPE_TIMESTAMP",
705            Self::Partition => "ADDITIONAL_COLUMN_TYPE_PARTITION",
706            Self::Offset => "ADDITIONAL_COLUMN_TYPE_OFFSET",
707            Self::Header => "ADDITIONAL_COLUMN_TYPE_HEADER",
708            Self::Filename => "ADDITIONAL_COLUMN_TYPE_FILENAME",
709            Self::Normal => "ADDITIONAL_COLUMN_TYPE_NORMAL",
710            Self::Payload => "ADDITIONAL_COLUMN_TYPE_PAYLOAD",
711            Self::PulsarMessageIdData => "ADDITIONAL_COLUMN_TYPE_PULSAR_MESSAGE_ID_DATA",
712        }
713    }
714    /// Creates an enum from field names used in the ProtoBuf definition.
715    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
716        match value {
717            "ADDITIONAL_COLUMN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
718            "ADDITIONAL_COLUMN_TYPE_KEY" => Some(Self::Key),
719            "ADDITIONAL_COLUMN_TYPE_TIMESTAMP" => Some(Self::Timestamp),
720            "ADDITIONAL_COLUMN_TYPE_PARTITION" => Some(Self::Partition),
721            "ADDITIONAL_COLUMN_TYPE_OFFSET" => Some(Self::Offset),
722            "ADDITIONAL_COLUMN_TYPE_HEADER" => Some(Self::Header),
723            "ADDITIONAL_COLUMN_TYPE_FILENAME" => Some(Self::Filename),
724            "ADDITIONAL_COLUMN_TYPE_NORMAL" => Some(Self::Normal),
725            "ADDITIONAL_COLUMN_TYPE_PAYLOAD" => Some(Self::Payload),
726            "ADDITIONAL_COLUMN_TYPE_PULSAR_MESSAGE_ID_DATA" => {
727                Some(Self::PulsarMessageIdData)
728            }
729            _ => None,
730        }
731    }
732}