risingwave_pb/
plan_common.rs

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