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 SourceRefreshModeFullRecompute {}
346    #[derive(prost_helpers::AnyPB)]
347    #[derive(Eq, Hash)]
348    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
349    pub enum RefreshMode {
350        #[prost(message, tag = "1")]
351        Streaming(SourceRefreshModeStreaming),
352        #[prost(message, tag = "2")]
353        FullRecompute(SourceRefreshModeFullRecompute),
354    }
355}
356#[derive(prost_helpers::AnyPB)]
357#[derive(prost_helpers::Version)]
358#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
359#[repr(i32)]
360pub enum ColumnDescVersion {
361    Unspecified = 0,
362    /// Introduced in <https://github.com/risingwavelabs/risingwave/pull/13707#discussion_r1429947537,>
363    /// in case DEFAULT_KEY_COLUMN_NAME changes
364    Pr13707 = 1,
365}
366impl ColumnDescVersion {
367    /// String value of the enum field names used in the ProtoBuf definition.
368    ///
369    /// The values are not transformed in any way and thus are considered stable
370    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
371    pub fn as_str_name(&self) -> &'static str {
372        match self {
373            Self::Unspecified => "COLUMN_DESC_VERSION_UNSPECIFIED",
374            Self::Pr13707 => "COLUMN_DESC_VERSION_PR_13707",
375        }
376    }
377    /// Creates an enum from field names used in the ProtoBuf definition.
378    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
379        match value {
380            "COLUMN_DESC_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
381            "COLUMN_DESC_VERSION_PR_13707" => Some(Self::Pr13707),
382            _ => None,
383        }
384    }
385}
386#[derive(prost_helpers::AnyPB)]
387#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
388#[repr(i32)]
389pub enum JoinType {
390    /// Note that it comes from Calcite's JoinRelType.
391    /// DO NOT HAVE direction for SEMI and ANTI now.
392    Unspecified = 0,
393    Inner = 1,
394    LeftOuter = 2,
395    RightOuter = 3,
396    FullOuter = 4,
397    LeftSemi = 5,
398    LeftAnti = 6,
399    RightSemi = 7,
400    RightAnti = 8,
401    AsofInner = 9,
402    AsofLeftOuter = 10,
403}
404impl JoinType {
405    /// String value of the enum field names used in the ProtoBuf definition.
406    ///
407    /// The values are not transformed in any way and thus are considered stable
408    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
409    pub fn as_str_name(&self) -> &'static str {
410        match self {
411            Self::Unspecified => "JOIN_TYPE_UNSPECIFIED",
412            Self::Inner => "JOIN_TYPE_INNER",
413            Self::LeftOuter => "JOIN_TYPE_LEFT_OUTER",
414            Self::RightOuter => "JOIN_TYPE_RIGHT_OUTER",
415            Self::FullOuter => "JOIN_TYPE_FULL_OUTER",
416            Self::LeftSemi => "JOIN_TYPE_LEFT_SEMI",
417            Self::LeftAnti => "JOIN_TYPE_LEFT_ANTI",
418            Self::RightSemi => "JOIN_TYPE_RIGHT_SEMI",
419            Self::RightAnti => "JOIN_TYPE_RIGHT_ANTI",
420            Self::AsofInner => "JOIN_TYPE_ASOF_INNER",
421            Self::AsofLeftOuter => "JOIN_TYPE_ASOF_LEFT_OUTER",
422        }
423    }
424    /// Creates an enum from field names used in the ProtoBuf definition.
425    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
426        match value {
427            "JOIN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
428            "JOIN_TYPE_INNER" => Some(Self::Inner),
429            "JOIN_TYPE_LEFT_OUTER" => Some(Self::LeftOuter),
430            "JOIN_TYPE_RIGHT_OUTER" => Some(Self::RightOuter),
431            "JOIN_TYPE_FULL_OUTER" => Some(Self::FullOuter),
432            "JOIN_TYPE_LEFT_SEMI" => Some(Self::LeftSemi),
433            "JOIN_TYPE_LEFT_ANTI" => Some(Self::LeftAnti),
434            "JOIN_TYPE_RIGHT_SEMI" => Some(Self::RightSemi),
435            "JOIN_TYPE_RIGHT_ANTI" => Some(Self::RightAnti),
436            "JOIN_TYPE_ASOF_INNER" => Some(Self::AsofInner),
437            "JOIN_TYPE_ASOF_LEFT_OUTER" => Some(Self::AsofLeftOuter),
438            _ => None,
439        }
440    }
441}
442#[derive(prost_helpers::AnyPB)]
443#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
444#[repr(i32)]
445pub enum AsOfJoinType {
446    Unspecified = 0,
447    Inner = 1,
448    LeftOuter = 2,
449}
450impl AsOfJoinType {
451    /// String value of the enum field names used in the ProtoBuf definition.
452    ///
453    /// The values are not transformed in any way and thus are considered stable
454    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
455    pub fn as_str_name(&self) -> &'static str {
456        match self {
457            Self::Unspecified => "AS_OF_JOIN_TYPE_UNSPECIFIED",
458            Self::Inner => "AS_OF_JOIN_TYPE_INNER",
459            Self::LeftOuter => "AS_OF_JOIN_TYPE_LEFT_OUTER",
460        }
461    }
462    /// Creates an enum from field names used in the ProtoBuf definition.
463    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
464        match value {
465            "AS_OF_JOIN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
466            "AS_OF_JOIN_TYPE_INNER" => Some(Self::Inner),
467            "AS_OF_JOIN_TYPE_LEFT_OUTER" => Some(Self::LeftOuter),
468            _ => None,
469        }
470    }
471}
472#[derive(prost_helpers::AnyPB)]
473#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
474#[repr(i32)]
475pub enum AsOfJoinInequalityType {
476    AsOfInequalityTypeUnspecified = 0,
477    AsOfInequalityTypeGt = 1,
478    AsOfInequalityTypeGe = 2,
479    AsOfInequalityTypeLt = 3,
480    AsOfInequalityTypeLe = 4,
481}
482impl AsOfJoinInequalityType {
483    /// String value of the enum field names used in the ProtoBuf definition.
484    ///
485    /// The values are not transformed in any way and thus are considered stable
486    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
487    pub fn as_str_name(&self) -> &'static str {
488        match self {
489            Self::AsOfInequalityTypeUnspecified => "AS_OF_INEQUALITY_TYPE_UNSPECIFIED",
490            Self::AsOfInequalityTypeGt => "AS_OF_INEQUALITY_TYPE_GT",
491            Self::AsOfInequalityTypeGe => "AS_OF_INEQUALITY_TYPE_GE",
492            Self::AsOfInequalityTypeLt => "AS_OF_INEQUALITY_TYPE_LT",
493            Self::AsOfInequalityTypeLe => "AS_OF_INEQUALITY_TYPE_LE",
494        }
495    }
496    /// Creates an enum from field names used in the ProtoBuf definition.
497    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
498        match value {
499            "AS_OF_INEQUALITY_TYPE_UNSPECIFIED" => {
500                Some(Self::AsOfInequalityTypeUnspecified)
501            }
502            "AS_OF_INEQUALITY_TYPE_GT" => Some(Self::AsOfInequalityTypeGt),
503            "AS_OF_INEQUALITY_TYPE_GE" => Some(Self::AsOfInequalityTypeGe),
504            "AS_OF_INEQUALITY_TYPE_LT" => Some(Self::AsOfInequalityTypeLt),
505            "AS_OF_INEQUALITY_TYPE_LE" => Some(Self::AsOfInequalityTypeLe),
506            _ => None,
507        }
508    }
509}
510/// <https://github.com/tokio-rs/prost/issues/80>
511#[derive(prost_helpers::AnyPB)]
512#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
513#[repr(i32)]
514pub enum FormatType {
515    Unspecified = 0,
516    Native = 1,
517    Debezium = 2,
518    DebeziumMongo = 3,
519    Maxwell = 4,
520    Canal = 5,
521    Upsert = 6,
522    Plain = 7,
523    None = 8,
524}
525impl FormatType {
526    /// String value of the enum field names used in the ProtoBuf definition.
527    ///
528    /// The values are not transformed in any way and thus are considered stable
529    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
530    pub fn as_str_name(&self) -> &'static str {
531        match self {
532            Self::Unspecified => "FORMAT_TYPE_UNSPECIFIED",
533            Self::Native => "FORMAT_TYPE_NATIVE",
534            Self::Debezium => "FORMAT_TYPE_DEBEZIUM",
535            Self::DebeziumMongo => "FORMAT_TYPE_DEBEZIUM_MONGO",
536            Self::Maxwell => "FORMAT_TYPE_MAXWELL",
537            Self::Canal => "FORMAT_TYPE_CANAL",
538            Self::Upsert => "FORMAT_TYPE_UPSERT",
539            Self::Plain => "FORMAT_TYPE_PLAIN",
540            Self::None => "FORMAT_TYPE_NONE",
541        }
542    }
543    /// Creates an enum from field names used in the ProtoBuf definition.
544    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
545        match value {
546            "FORMAT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
547            "FORMAT_TYPE_NATIVE" => Some(Self::Native),
548            "FORMAT_TYPE_DEBEZIUM" => Some(Self::Debezium),
549            "FORMAT_TYPE_DEBEZIUM_MONGO" => Some(Self::DebeziumMongo),
550            "FORMAT_TYPE_MAXWELL" => Some(Self::Maxwell),
551            "FORMAT_TYPE_CANAL" => Some(Self::Canal),
552            "FORMAT_TYPE_UPSERT" => Some(Self::Upsert),
553            "FORMAT_TYPE_PLAIN" => Some(Self::Plain),
554            "FORMAT_TYPE_NONE" => Some(Self::None),
555            _ => None,
556        }
557    }
558}
559#[derive(prost_helpers::AnyPB)]
560#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
561#[repr(i32)]
562pub enum EncodeType {
563    Unspecified = 0,
564    Native = 1,
565    Avro = 2,
566    Csv = 3,
567    Protobuf = 4,
568    Json = 5,
569    Bytes = 6,
570    Template = 7,
571    None = 8,
572    Text = 9,
573    Parquet = 10,
574}
575impl EncodeType {
576    /// String value of the enum field names used in the ProtoBuf definition.
577    ///
578    /// The values are not transformed in any way and thus are considered stable
579    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
580    pub fn as_str_name(&self) -> &'static str {
581        match self {
582            Self::Unspecified => "ENCODE_TYPE_UNSPECIFIED",
583            Self::Native => "ENCODE_TYPE_NATIVE",
584            Self::Avro => "ENCODE_TYPE_AVRO",
585            Self::Csv => "ENCODE_TYPE_CSV",
586            Self::Protobuf => "ENCODE_TYPE_PROTOBUF",
587            Self::Json => "ENCODE_TYPE_JSON",
588            Self::Bytes => "ENCODE_TYPE_BYTES",
589            Self::Template => "ENCODE_TYPE_TEMPLATE",
590            Self::None => "ENCODE_TYPE_NONE",
591            Self::Text => "ENCODE_TYPE_TEXT",
592            Self::Parquet => "ENCODE_TYPE_PARQUET",
593        }
594    }
595    /// Creates an enum from field names used in the ProtoBuf definition.
596    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
597        match value {
598            "ENCODE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
599            "ENCODE_TYPE_NATIVE" => Some(Self::Native),
600            "ENCODE_TYPE_AVRO" => Some(Self::Avro),
601            "ENCODE_TYPE_CSV" => Some(Self::Csv),
602            "ENCODE_TYPE_PROTOBUF" => Some(Self::Protobuf),
603            "ENCODE_TYPE_JSON" => Some(Self::Json),
604            "ENCODE_TYPE_BYTES" => Some(Self::Bytes),
605            "ENCODE_TYPE_TEMPLATE" => Some(Self::Template),
606            "ENCODE_TYPE_NONE" => Some(Self::None),
607            "ENCODE_TYPE_TEXT" => Some(Self::Text),
608            "ENCODE_TYPE_PARQUET" => Some(Self::Parquet),
609            _ => None,
610        }
611    }
612}
613#[derive(prost_helpers::AnyPB)]
614#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
615#[repr(i32)]
616pub enum RowFormatType {
617    RowUnspecified = 0,
618    Json = 1,
619    Protobuf = 2,
620    DebeziumJson = 3,
621    Avro = 4,
622    Maxwell = 5,
623    CanalJson = 6,
624    Csv = 7,
625    Native = 8,
626    DebeziumAvro = 9,
627    UpsertJson = 10,
628    UpsertAvro = 11,
629    DebeziumMongoJson = 12,
630    Bytes = 13,
631}
632impl RowFormatType {
633    /// String value of the enum field names used in the ProtoBuf definition.
634    ///
635    /// The values are not transformed in any way and thus are considered stable
636    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
637    pub fn as_str_name(&self) -> &'static str {
638        match self {
639            Self::RowUnspecified => "ROW_UNSPECIFIED",
640            Self::Json => "JSON",
641            Self::Protobuf => "PROTOBUF",
642            Self::DebeziumJson => "DEBEZIUM_JSON",
643            Self::Avro => "AVRO",
644            Self::Maxwell => "MAXWELL",
645            Self::CanalJson => "CANAL_JSON",
646            Self::Csv => "CSV",
647            Self::Native => "NATIVE",
648            Self::DebeziumAvro => "DEBEZIUM_AVRO",
649            Self::UpsertJson => "UPSERT_JSON",
650            Self::UpsertAvro => "UPSERT_AVRO",
651            Self::DebeziumMongoJson => "DEBEZIUM_MONGO_JSON",
652            Self::Bytes => "BYTES",
653        }
654    }
655    /// Creates an enum from field names used in the ProtoBuf definition.
656    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
657        match value {
658            "ROW_UNSPECIFIED" => Some(Self::RowUnspecified),
659            "JSON" => Some(Self::Json),
660            "PROTOBUF" => Some(Self::Protobuf),
661            "DEBEZIUM_JSON" => Some(Self::DebeziumJson),
662            "AVRO" => Some(Self::Avro),
663            "MAXWELL" => Some(Self::Maxwell),
664            "CANAL_JSON" => Some(Self::CanalJson),
665            "CSV" => Some(Self::Csv),
666            "NATIVE" => Some(Self::Native),
667            "DEBEZIUM_AVRO" => Some(Self::DebeziumAvro),
668            "UPSERT_JSON" => Some(Self::UpsertJson),
669            "UPSERT_AVRO" => Some(Self::UpsertAvro),
670            "DEBEZIUM_MONGO_JSON" => Some(Self::DebeziumMongoJson),
671            "BYTES" => Some(Self::Bytes),
672            _ => None,
673        }
674    }
675}
676#[derive(prost_helpers::AnyPB)]
677#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
678#[repr(i32)]
679pub enum AdditionalColumnType {
680    Unspecified = 0,
681    Key = 1,
682    Timestamp = 2,
683    Partition = 3,
684    Offset = 4,
685    Header = 5,
686    Filename = 6,
687    Normal = 7,
688    Payload = 8,
689    /// for pulsar source, used for ack message
690    PulsarMessageIdData = 9,
691}
692impl AdditionalColumnType {
693    /// String value of the enum field names used in the ProtoBuf definition.
694    ///
695    /// The values are not transformed in any way and thus are considered stable
696    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
697    pub fn as_str_name(&self) -> &'static str {
698        match self {
699            Self::Unspecified => "ADDITIONAL_COLUMN_TYPE_UNSPECIFIED",
700            Self::Key => "ADDITIONAL_COLUMN_TYPE_KEY",
701            Self::Timestamp => "ADDITIONAL_COLUMN_TYPE_TIMESTAMP",
702            Self::Partition => "ADDITIONAL_COLUMN_TYPE_PARTITION",
703            Self::Offset => "ADDITIONAL_COLUMN_TYPE_OFFSET",
704            Self::Header => "ADDITIONAL_COLUMN_TYPE_HEADER",
705            Self::Filename => "ADDITIONAL_COLUMN_TYPE_FILENAME",
706            Self::Normal => "ADDITIONAL_COLUMN_TYPE_NORMAL",
707            Self::Payload => "ADDITIONAL_COLUMN_TYPE_PAYLOAD",
708            Self::PulsarMessageIdData => "ADDITIONAL_COLUMN_TYPE_PULSAR_MESSAGE_ID_DATA",
709        }
710    }
711    /// Creates an enum from field names used in the ProtoBuf definition.
712    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
713        match value {
714            "ADDITIONAL_COLUMN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
715            "ADDITIONAL_COLUMN_TYPE_KEY" => Some(Self::Key),
716            "ADDITIONAL_COLUMN_TYPE_TIMESTAMP" => Some(Self::Timestamp),
717            "ADDITIONAL_COLUMN_TYPE_PARTITION" => Some(Self::Partition),
718            "ADDITIONAL_COLUMN_TYPE_OFFSET" => Some(Self::Offset),
719            "ADDITIONAL_COLUMN_TYPE_HEADER" => Some(Self::Header),
720            "ADDITIONAL_COLUMN_TYPE_FILENAME" => Some(Self::Filename),
721            "ADDITIONAL_COLUMN_TYPE_NORMAL" => Some(Self::Normal),
722            "ADDITIONAL_COLUMN_TYPE_PAYLOAD" => Some(Self::Payload),
723            "ADDITIONAL_COLUMN_TYPE_PULSAR_MESSAGE_ID_DATA" => {
724                Some(Self::PulsarMessageIdData)
725            }
726            _ => None,
727        }
728    }
729}