Skip to main content

chalk_client/gen/
chalk.expression.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Identifier {
4    #[prost(string, tag = "1")]
5    pub name: ::prost::alloc::string::String,
6}
7#[derive(Clone, PartialEq, ::prost::Message)]
8pub struct TypedIdentifier {
9    #[prost(string, tag = "1")]
10    pub name: ::prost::alloc::string::String,
11    #[prost(message, optional, tag = "2")]
12    pub r#type: ::core::option::Option<super::super::arrow::v1::ArrowType>,
13}
14/// A field-access expression, like `arr.length`.
15#[derive(Clone, PartialEq, ::prost::Message)]
16pub struct ExprGetAttribute {
17    #[prost(message, optional, boxed, tag = "1")]
18    pub parent: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
19    #[prost(message, optional, tag = "2")]
20    pub attribute: ::core::option::Option<Identifier>,
21}
22/// A key-lookup expression, like `hash\[name\]` or `matrix\[r, c\]`.
23#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct ExprGetSubscript {
25    #[prost(message, optional, boxed, tag = "1")]
26    pub parent: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
27    #[prost(message, repeated, tag = "2")]
28    pub subscript: ::prost::alloc::vec::Vec<LogicalExprNode>,
29}
30/// A function call, like `abs(x)` or `arr.indexof(6)` or `a + b`.
31///
32/// In function calls, like `abs(x)`, the `func` will be an identifier with the
33/// specified name.
34///
35/// In method calls, like `arr.indexof(6)`, the `func` will be a get-attribute
36/// expression.
37///
38/// In operator expressions, the `func` will be an identifier with the operator
39/// as its name e.g. `"+"`.
40#[derive(Clone, PartialEq, ::prost::Message)]
41pub struct ExprCall {
42    #[prost(message, optional, boxed, tag = "1")]
43    pub func: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
44    #[prost(message, repeated, tag = "2")]
45    pub args: ::prost::alloc::vec::Vec<LogicalExprNode>,
46    #[prost(map = "string, message", tag = "3")]
47    pub kwargs: ::std::collections::HashMap<
48        ::prost::alloc::string::String,
49        LogicalExprNode,
50    >,
51    #[prost(string, optional, tag = "4")]
52    pub repr_override: ::core::option::Option<::prost::alloc::string::String>,
53}
54/// A literal expression.
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct ExprLiteral {
57    #[prost(message, optional, tag = "1")]
58    pub value: ::core::option::Option<super::super::arrow::v1::ScalarValue>,
59    /// All Python literal values are encoded as arrow scalar values.
60    /// - If this bool is `False`, then the decoded value was originally a plain
61    /// Python value.
62    /// - If this bool is `True`, then the decoded value should be a
63    /// `pyarrow.Scalar` value.
64    #[prost(bool, tag = "2")]
65    pub is_arrow_scalar_object: bool,
66}
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct LogicalExprNode {
69    /// The memory ID of this node. Nodes with equal id share are *identical*, sharing any nondeterminism and mutations.
70    #[prost(string, tag = "40")]
71    pub expr_id: ::prost::alloc::string::String,
72    /// Each expression has a form, which is one of the following.
73    ///
74    /// These forms are deliberately purely syntactic - additional semantic
75    /// information, like types, are dependent on the feature graph, which may
76    /// therefore be out-of-date when decoding an expression message.
77    ///
78    /// Consumers must always perform additional parsing and validation, so
79    /// semantic information should not be stored in the proto message itself.
80    #[prost(oneof = "logical_expr_node::ExprForm", tags = "35, 36, 37, 38, 39, 41")]
81    pub expr_form: ::core::option::Option<logical_expr_node::ExprForm>,
82    /// All of these expression forms are deprecated.
83    /// A simpler syntactic representation is used now.
84    #[prost(
85        oneof = "logical_expr_node::ExprType",
86        tags = "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"
87    )]
88    pub expr_type: ::core::option::Option<logical_expr_node::ExprType>,
89}
90/// Nested message and enum types in `LogicalExprNode`.
91pub mod logical_expr_node {
92    /// Each expression has a form, which is one of the following.
93    ///
94    /// These forms are deliberately purely syntactic - additional semantic
95    /// information, like types, are dependent on the feature graph, which may
96    /// therefore be out-of-date when decoding an expression message.
97    ///
98    /// Consumers must always perform additional parsing and validation, so
99    /// semantic information should not be stored in the proto message itself.
100    #[derive(Clone, PartialEq, ::prost::Oneof)]
101    pub enum ExprForm {
102        #[prost(message, tag = "35")]
103        Identifier(super::Identifier),
104        #[prost(message, tag = "36")]
105        GetAttribute(::prost::alloc::boxed::Box<super::ExprGetAttribute>),
106        #[prost(message, tag = "37")]
107        GetSubscript(::prost::alloc::boxed::Box<super::ExprGetSubscript>),
108        #[prost(message, tag = "38")]
109        Call(::prost::alloc::boxed::Box<super::ExprCall>),
110        #[prost(message, tag = "39")]
111        LiteralValue(super::ExprLiteral),
112        #[prost(message, tag = "41")]
113        TypedIdentifier(super::TypedIdentifier),
114    }
115    /// All of these expression forms are deprecated.
116    /// A simpler syntactic representation is used now.
117    #[derive(Clone, PartialEq, ::prost::Oneof)]
118    pub enum ExprType {
119        /// column references
120        #[prost(message, tag = "1")]
121        Column(super::Column),
122        /// alias
123        #[prost(message, tag = "2")]
124        Alias(::prost::alloc::boxed::Box<super::AliasNode>),
125        #[prost(message, tag = "3")]
126        Literal(super::super::super::arrow::v1::ScalarValue),
127        /// binary expressions
128        #[prost(message, tag = "4")]
129        BinaryExpr(super::BinaryExprNode),
130        /// aggregate expressions
131        #[prost(message, tag = "5")]
132        AggregateExpr(::prost::alloc::boxed::Box<super::AggregateExprNode>),
133        /// null checks
134        #[prost(message, tag = "6")]
135        IsNullExpr(::prost::alloc::boxed::Box<super::IsNull>),
136        #[prost(message, tag = "7")]
137        IsNotNullExpr(::prost::alloc::boxed::Box<super::IsNotNull>),
138        #[prost(message, tag = "8")]
139        NotExpr(::prost::alloc::boxed::Box<super::Not>),
140        #[prost(message, tag = "9")]
141        Between(::prost::alloc::boxed::Box<super::BetweenNode>),
142        #[prost(message, tag = "10")]
143        Case(::prost::alloc::boxed::Box<super::CaseNode>),
144        #[prost(message, tag = "11")]
145        Cast(::prost::alloc::boxed::Box<super::CastNode>),
146        #[prost(message, tag = "12")]
147        Sort(::prost::alloc::boxed::Box<super::SortExprNode>),
148        #[prost(message, tag = "13")]
149        Negative(::prost::alloc::boxed::Box<super::NegativeNode>),
150        #[prost(message, tag = "14")]
151        InList(::prost::alloc::boxed::Box<super::InListNode>),
152        #[prost(message, tag = "15")]
153        Wildcard(super::Wildcard),
154        #[prost(message, tag = "16")]
155        ScalarFunction(super::ScalarFunctionNode),
156        #[prost(message, tag = "17")]
157        TryCast(::prost::alloc::boxed::Box<super::TryCastNode>),
158        /// window expressions
159        #[prost(message, tag = "18")]
160        WindowExpr(::prost::alloc::boxed::Box<super::WindowExprNode>),
161        /// AggregateUDF expressions
162        #[prost(message, tag = "19")]
163        AggregateUdfExpr(::prost::alloc::boxed::Box<super::AggregateUdfExprNode>),
164        /// Scalar UDF expressions
165        #[prost(message, tag = "20")]
166        ScalarUdfExpr(super::ScalarUdfExprNode),
167        #[prost(message, tag = "21")]
168        GetIndexedField(::prost::alloc::boxed::Box<super::GetIndexedField>),
169        #[prost(message, tag = "22")]
170        GroupingSet(super::GroupingSetNode),
171        #[prost(message, tag = "23")]
172        Cube(super::CubeNode),
173        #[prost(message, tag = "24")]
174        Rollup(super::RollupNode),
175        #[prost(message, tag = "25")]
176        IsTrue(::prost::alloc::boxed::Box<super::IsTrue>),
177        #[prost(message, tag = "26")]
178        IsFalse(::prost::alloc::boxed::Box<super::IsFalse>),
179        #[prost(message, tag = "27")]
180        IsUnknown(::prost::alloc::boxed::Box<super::IsUnknown>),
181        #[prost(message, tag = "28")]
182        IsNotTrue(::prost::alloc::boxed::Box<super::IsNotTrue>),
183        #[prost(message, tag = "29")]
184        IsNotFalse(::prost::alloc::boxed::Box<super::IsNotFalse>),
185        #[prost(message, tag = "30")]
186        IsNotUnknown(::prost::alloc::boxed::Box<super::IsNotUnknown>),
187        #[prost(message, tag = "31")]
188        Like(::prost::alloc::boxed::Box<super::LikeNode>),
189        #[prost(message, tag = "32")]
190        Ilike(::prost::alloc::boxed::Box<super::ILikeNode>),
191        #[prost(message, tag = "33")]
192        SimilarTo(::prost::alloc::boxed::Box<super::SimilarToNode>),
193        #[prost(message, tag = "34")]
194        Placeholder(super::PlaceholderNode),
195    }
196}
197#[derive(Clone, PartialEq, ::prost::Message)]
198pub struct ColumnRelation {
199    #[prost(string, tag = "1")]
200    pub relation: ::prost::alloc::string::String,
201}
202#[derive(Clone, PartialEq, ::prost::Message)]
203pub struct Column {
204    #[prost(string, tag = "1")]
205    pub name: ::prost::alloc::string::String,
206    #[prost(message, optional, tag = "2")]
207    pub relation: ::core::option::Option<ColumnRelation>,
208}
209#[derive(Clone, PartialEq, ::prost::Message)]
210pub struct Wildcard {
211    #[prost(string, optional, tag = "1")]
212    pub qualifier: ::core::option::Option<::prost::alloc::string::String>,
213}
214#[derive(Clone, PartialEq, ::prost::Message)]
215pub struct PlaceholderNode {
216    #[prost(string, tag = "1")]
217    pub id: ::prost::alloc::string::String,
218    #[prost(message, optional, tag = "2")]
219    pub data_type: ::core::option::Option<super::super::arrow::v1::ArrowType>,
220}
221#[derive(Clone, PartialEq, ::prost::Message)]
222pub struct LogicalExprList {
223    #[prost(message, repeated, tag = "1")]
224    pub expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
225}
226#[derive(Clone, PartialEq, ::prost::Message)]
227pub struct GroupingSetNode {
228    #[prost(message, repeated, tag = "1")]
229    pub expr: ::prost::alloc::vec::Vec<LogicalExprList>,
230}
231#[derive(Clone, PartialEq, ::prost::Message)]
232pub struct CubeNode {
233    #[prost(message, repeated, tag = "1")]
234    pub expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
235}
236#[derive(Clone, PartialEq, ::prost::Message)]
237pub struct RollupNode {
238    #[prost(message, repeated, tag = "1")]
239    pub expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
240}
241#[derive(Clone, PartialEq, ::prost::Message)]
242pub struct NamedStructField {
243    #[prost(message, optional, tag = "1")]
244    pub name: ::core::option::Option<super::super::arrow::v1::ScalarValue>,
245}
246#[derive(Clone, PartialEq, ::prost::Message)]
247pub struct ListIndex {
248    #[prost(message, optional, boxed, tag = "1")]
249    pub key: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
250}
251#[derive(Clone, PartialEq, ::prost::Message)]
252pub struct ListRange {
253    #[prost(message, optional, boxed, tag = "1")]
254    pub start: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
255    #[prost(message, optional, boxed, tag = "2")]
256    pub stop: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
257}
258#[derive(Clone, PartialEq, ::prost::Message)]
259pub struct GetIndexedField {
260    #[prost(message, optional, boxed, tag = "1")]
261    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
262    #[prost(oneof = "get_indexed_field::Field", tags = "2, 3, 4")]
263    pub field: ::core::option::Option<get_indexed_field::Field>,
264}
265/// Nested message and enum types in `GetIndexedField`.
266pub mod get_indexed_field {
267    #[derive(Clone, PartialEq, ::prost::Oneof)]
268    pub enum Field {
269        #[prost(message, tag = "2")]
270        NamedStructField(super::NamedStructField),
271        #[prost(message, tag = "3")]
272        ListIndex(::prost::alloc::boxed::Box<super::ListIndex>),
273        #[prost(message, tag = "4")]
274        ListRange(::prost::alloc::boxed::Box<super::ListRange>),
275    }
276}
277#[derive(Clone, PartialEq, ::prost::Message)]
278pub struct IsNull {
279    #[prost(message, optional, boxed, tag = "1")]
280    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
281}
282#[derive(Clone, PartialEq, ::prost::Message)]
283pub struct IsNotNull {
284    #[prost(message, optional, boxed, tag = "1")]
285    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
286}
287#[derive(Clone, PartialEq, ::prost::Message)]
288pub struct IsTrue {
289    #[prost(message, optional, boxed, tag = "1")]
290    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
291}
292#[derive(Clone, PartialEq, ::prost::Message)]
293pub struct IsFalse {
294    #[prost(message, optional, boxed, tag = "1")]
295    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
296}
297#[derive(Clone, PartialEq, ::prost::Message)]
298pub struct IsUnknown {
299    #[prost(message, optional, boxed, tag = "1")]
300    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
301}
302#[derive(Clone, PartialEq, ::prost::Message)]
303pub struct IsNotTrue {
304    #[prost(message, optional, boxed, tag = "1")]
305    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
306}
307#[derive(Clone, PartialEq, ::prost::Message)]
308pub struct IsNotFalse {
309    #[prost(message, optional, boxed, tag = "1")]
310    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
311}
312#[derive(Clone, PartialEq, ::prost::Message)]
313pub struct IsNotUnknown {
314    #[prost(message, optional, boxed, tag = "1")]
315    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
316}
317#[derive(Clone, PartialEq, ::prost::Message)]
318pub struct Not {
319    #[prost(message, optional, boxed, tag = "1")]
320    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
321}
322#[derive(Clone, PartialEq, ::prost::Message)]
323pub struct AliasNode {
324    #[prost(message, optional, boxed, tag = "1")]
325    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
326    #[prost(string, tag = "2")]
327    pub alias: ::prost::alloc::string::String,
328    #[prost(message, repeated, tag = "3")]
329    pub relation: ::prost::alloc::vec::Vec<OwnedTableReference>,
330}
331#[derive(Clone, PartialEq, ::prost::Message)]
332pub struct BareTableReference {
333    #[prost(string, tag = "1")]
334    pub table: ::prost::alloc::string::String,
335}
336#[derive(Clone, PartialEq, ::prost::Message)]
337pub struct PartialTableReference {
338    #[prost(string, tag = "1")]
339    pub schema: ::prost::alloc::string::String,
340    #[prost(string, tag = "2")]
341    pub table: ::prost::alloc::string::String,
342}
343#[derive(Clone, PartialEq, ::prost::Message)]
344pub struct FullTableReference {
345    #[prost(string, tag = "1")]
346    pub catalog: ::prost::alloc::string::String,
347    #[prost(string, tag = "2")]
348    pub schema: ::prost::alloc::string::String,
349    #[prost(string, tag = "3")]
350    pub table: ::prost::alloc::string::String,
351}
352#[derive(Clone, PartialEq, ::prost::Message)]
353pub struct OwnedTableReference {
354    #[prost(oneof = "owned_table_reference::TableReferenceEnum", tags = "1, 2, 3")]
355    pub table_reference_enum: ::core::option::Option<
356        owned_table_reference::TableReferenceEnum,
357    >,
358}
359/// Nested message and enum types in `OwnedTableReference`.
360pub mod owned_table_reference {
361    #[derive(Clone, PartialEq, ::prost::Oneof)]
362    pub enum TableReferenceEnum {
363        #[prost(message, tag = "1")]
364        Bare(super::BareTableReference),
365        #[prost(message, tag = "2")]
366        Partial(super::PartialTableReference),
367        #[prost(message, tag = "3")]
368        Full(super::FullTableReference),
369    }
370}
371#[derive(Clone, PartialEq, ::prost::Message)]
372pub struct BinaryExprNode {
373    /// Represents the operands from the left inner most expression
374    /// to the right outer most expression where each of them are chained
375    /// with the operator 'op'.
376    #[prost(message, repeated, tag = "1")]
377    pub operands: ::prost::alloc::vec::Vec<LogicalExprNode>,
378    #[prost(string, tag = "3")]
379    pub op: ::prost::alloc::string::String,
380}
381#[derive(Clone, PartialEq, ::prost::Message)]
382pub struct NegativeNode {
383    #[prost(message, optional, boxed, tag = "1")]
384    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
385}
386#[derive(Clone, PartialEq, ::prost::Message)]
387pub struct InListNode {
388    #[prost(message, optional, boxed, tag = "1")]
389    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
390    #[prost(message, repeated, tag = "2")]
391    pub list: ::prost::alloc::vec::Vec<LogicalExprNode>,
392    #[prost(bool, tag = "3")]
393    pub negated: bool,
394}
395#[derive(Clone, PartialEq, ::prost::Message)]
396pub struct ScalarFunctionNode {
397    #[prost(enumeration = "ScalarFunction", tag = "1")]
398    pub fun: i32,
399    #[prost(message, repeated, tag = "2")]
400    pub args: ::prost::alloc::vec::Vec<LogicalExprNode>,
401}
402#[derive(Clone, PartialEq, ::prost::Message)]
403pub struct AggregateExprNode {
404    #[prost(enumeration = "AggregateFunction", tag = "1")]
405    pub aggr_function: i32,
406    #[prost(message, repeated, tag = "2")]
407    pub expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
408    #[prost(bool, tag = "3")]
409    pub distinct: bool,
410    #[prost(message, optional, boxed, tag = "4")]
411    pub filter: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
412    #[prost(message, repeated, tag = "5")]
413    pub order_by: ::prost::alloc::vec::Vec<LogicalExprNode>,
414}
415#[derive(Clone, PartialEq, ::prost::Message)]
416pub struct AggregateUdfExprNode {
417    #[prost(string, tag = "1")]
418    pub fun_name: ::prost::alloc::string::String,
419    #[prost(message, repeated, tag = "2")]
420    pub args: ::prost::alloc::vec::Vec<LogicalExprNode>,
421    #[prost(message, optional, boxed, tag = "3")]
422    pub filter: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
423    #[prost(message, repeated, tag = "4")]
424    pub order_by: ::prost::alloc::vec::Vec<LogicalExprNode>,
425    #[prost(map = "string, message", tag = "5")]
426    pub kwargs: ::std::collections::HashMap<
427        ::prost::alloc::string::String,
428        LogicalExprNode,
429    >,
430}
431#[derive(Clone, PartialEq, ::prost::Message)]
432pub struct ScalarUdfExprNode {
433    #[prost(string, tag = "1")]
434    pub fun_name: ::prost::alloc::string::String,
435    #[prost(message, repeated, tag = "2")]
436    pub args: ::prost::alloc::vec::Vec<LogicalExprNode>,
437}
438#[derive(Clone, PartialEq, ::prost::Message)]
439pub struct WindowExprNode {
440    #[prost(message, optional, boxed, tag = "4")]
441    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
442    #[prost(message, repeated, tag = "5")]
443    pub partition_by: ::prost::alloc::vec::Vec<LogicalExprNode>,
444    #[prost(message, repeated, tag = "6")]
445    pub order_by: ::prost::alloc::vec::Vec<LogicalExprNode>,
446    /// repeated LogicalExprNode filter = 7;
447    #[prost(message, optional, tag = "8")]
448    pub window_frame: ::core::option::Option<WindowFrame>,
449    #[prost(oneof = "window_expr_node::WindowFunction", tags = "1, 2, 3, 9")]
450    pub window_function: ::core::option::Option<window_expr_node::WindowFunction>,
451}
452/// Nested message and enum types in `WindowExprNode`.
453pub mod window_expr_node {
454    #[derive(Clone, PartialEq, ::prost::Oneof)]
455    pub enum WindowFunction {
456        #[prost(enumeration = "super::AggregateFunction", tag = "1")]
457        AggrFunction(i32),
458        #[prost(enumeration = "super::BuiltInWindowFunction", tag = "2")]
459        BuiltInFunction(i32),
460        #[prost(string, tag = "3")]
461        Udaf(::prost::alloc::string::String),
462        #[prost(string, tag = "9")]
463        Udwf(::prost::alloc::string::String),
464    }
465}
466#[derive(Clone, PartialEq, ::prost::Message)]
467pub struct BetweenNode {
468    #[prost(message, optional, boxed, tag = "1")]
469    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
470    #[prost(bool, tag = "2")]
471    pub negated: bool,
472    #[prost(message, optional, boxed, tag = "3")]
473    pub low: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
474    #[prost(message, optional, boxed, tag = "4")]
475    pub high: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
476}
477#[derive(Clone, PartialEq, ::prost::Message)]
478pub struct LikeNode {
479    #[prost(bool, tag = "1")]
480    pub negated: bool,
481    #[prost(message, optional, boxed, tag = "2")]
482    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
483    #[prost(message, optional, boxed, tag = "3")]
484    pub pattern: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
485    #[prost(string, tag = "4")]
486    pub escape_char: ::prost::alloc::string::String,
487}
488#[derive(Clone, PartialEq, ::prost::Message)]
489pub struct ILikeNode {
490    #[prost(bool, tag = "1")]
491    pub negated: bool,
492    #[prost(message, optional, boxed, tag = "2")]
493    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
494    #[prost(message, optional, boxed, tag = "3")]
495    pub pattern: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
496    #[prost(string, tag = "4")]
497    pub escape_char: ::prost::alloc::string::String,
498}
499#[derive(Clone, PartialEq, ::prost::Message)]
500pub struct SimilarToNode {
501    #[prost(bool, tag = "1")]
502    pub negated: bool,
503    #[prost(message, optional, boxed, tag = "2")]
504    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
505    #[prost(message, optional, boxed, tag = "3")]
506    pub pattern: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
507    #[prost(string, tag = "4")]
508    pub escape_char: ::prost::alloc::string::String,
509}
510#[derive(Clone, PartialEq, ::prost::Message)]
511pub struct CaseNode {
512    #[prost(message, optional, boxed, tag = "1")]
513    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
514    #[prost(message, repeated, tag = "2")]
515    pub when_then_expr: ::prost::alloc::vec::Vec<WhenThen>,
516    #[prost(message, optional, boxed, tag = "3")]
517    pub else_expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
518}
519#[derive(Clone, PartialEq, ::prost::Message)]
520pub struct WhenThen {
521    #[prost(message, optional, tag = "1")]
522    pub when_expr: ::core::option::Option<LogicalExprNode>,
523    #[prost(message, optional, tag = "2")]
524    pub then_expr: ::core::option::Option<LogicalExprNode>,
525}
526#[derive(Clone, PartialEq, ::prost::Message)]
527pub struct CastNode {
528    #[prost(message, optional, boxed, tag = "1")]
529    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
530    #[prost(message, optional, tag = "2")]
531    pub arrow_type: ::core::option::Option<super::super::arrow::v1::ArrowType>,
532}
533#[derive(Clone, PartialEq, ::prost::Message)]
534pub struct TryCastNode {
535    #[prost(message, optional, boxed, tag = "1")]
536    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
537    #[prost(message, optional, tag = "2")]
538    pub arrow_type: ::core::option::Option<super::super::arrow::v1::ArrowType>,
539}
540#[derive(Clone, PartialEq, ::prost::Message)]
541pub struct SortExprNode {
542    #[prost(message, optional, boxed, tag = "1")]
543    pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
544    #[prost(bool, tag = "2")]
545    pub asc: bool,
546    #[prost(bool, tag = "3")]
547    pub nulls_first: bool,
548}
549#[derive(Clone, PartialEq, ::prost::Message)]
550pub struct WindowFrame {
551    #[prost(enumeration = "WindowFrameUnits", tag = "1")]
552    pub window_frame_units: i32,
553    #[prost(message, optional, tag = "2")]
554    pub start_bound: ::core::option::Option<WindowFrameBound>,
555    #[prost(message, optional, tag = "3")]
556    pub bound: ::core::option::Option<WindowFrameBound>,
557}
558#[derive(Clone, PartialEq, ::prost::Message)]
559pub struct WindowFrameBound {
560    #[prost(enumeration = "WindowFrameBoundType", tag = "1")]
561    pub window_frame_bound_type: i32,
562    #[prost(message, optional, tag = "2")]
563    pub bound_value: ::core::option::Option<super::super::arrow::v1::ScalarValue>,
564}
565#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
566#[repr(i32)]
567pub enum ScalarFunction {
568    Unspecified = 0,
569    Abs = 1,
570    Acos = 2,
571    Asin = 3,
572    Atan = 4,
573    Ascii = 5,
574    Ceil = 6,
575    Cos = 7,
576    Digest = 8,
577    Exp = 9,
578    Floor = 10,
579    Ln = 11,
580    Log = 12,
581    Log10 = 13,
582    Log2 = 14,
583    Round = 15,
584    Signum = 16,
585    Sin = 17,
586    Sqrt = 18,
587    Tan = 19,
588    Trunc = 20,
589    Array = 21,
590    RegexpMatch = 22,
591    BitLength = 23,
592    Btrim = 24,
593    CharacterLength = 25,
594    Chr = 26,
595    Concat = 27,
596    ConcatWithSeparator = 28,
597    DatePart = 29,
598    DateTrunc = 30,
599    InitCap = 31,
600    Left = 32,
601    Lpad = 33,
602    Lower = 34,
603    Ltrim = 35,
604    Md5 = 36,
605    NullIf = 37,
606    OctetLength = 38,
607    Random = 39,
608    RegexpReplace = 40,
609    Repeat = 41,
610    Replace = 42,
611    Reverse = 43,
612    Right = 44,
613    Rpad = 45,
614    Rtrim = 46,
615    Sha224 = 47,
616    Sha256 = 48,
617    Sha384 = 49,
618    Sha512 = 50,
619    SplitPart = 51,
620    StartsWith = 52,
621    Strpos = 53,
622    Substr = 54,
623    ToHex = 55,
624    ToTimestamp = 56,
625    ToTimestampMillis = 57,
626    ToTimestampMicros = 58,
627    ToTimestampSeconds = 59,
628    Now = 60,
629    Translate = 61,
630    Trim = 62,
631    Upper = 63,
632    Coalesce = 64,
633    Power = 65,
634    StructFun = 66,
635    FromUnixtime = 67,
636    Atan2 = 68,
637    DateBin = 69,
638    ArrowTypeof = 70,
639    CurrentDate = 71,
640    CurrentTime = 72,
641    Uuid = 73,
642    Cbrt = 74,
643    Acosh = 75,
644    Asinh = 76,
645    Atanh = 77,
646    Sinh = 78,
647    Cosh = 79,
648    Tanh = 80,
649    Pi = 81,
650    Degrees = 82,
651    Radians = 83,
652    Factorial = 84,
653    Lcm = 85,
654    Gcd = 86,
655    ArrayAppend = 87,
656    ArrayConcat = 88,
657    ArrayDims = 89,
658    ArrayRepeat = 90,
659    ArrayLength = 91,
660    ArrayNdims = 92,
661    ArrayPosition = 93,
662    ArrayPositions = 94,
663    ArrayPrepend = 95,
664    ArrayRemove = 96,
665    ArrayReplace = 97,
666    ArrayToString = 98,
667    Cardinality = 99,
668    ArrayElement = 100,
669    ArraySlice = 101,
670    Encode = 102,
671    Decode = 103,
672    Cot = 104,
673    ArrayHas = 105,
674    ArrayHasAny = 106,
675    ArrayHasAll = 107,
676    ArrayRemoveN = 108,
677    ArrayReplaceN = 109,
678    ArrayRemoveAll = 110,
679    ArrayReplaceAll = 111,
680    Nanvl = 112,
681    Flatten = 113,
682    Isnan = 114,
683    Iszero = 115,
684    ArrayEmpty = 116,
685    ArrayPopBack = 117,
686    StringToArray = 118,
687    ToTimestampNanos = 119,
688    ArrayIntersect = 120,
689    ArrayUnion = 121,
690    OverLay = 122,
691    Range = 123,
692    ArrayExcept = 124,
693    ArrayPopFront = 125,
694    Levenshtein = 126,
695    SubstrIndex = 127,
696    FindInSet = 128,
697    ArraySort = 129,
698    ArrayDistinct = 130,
699}
700impl ScalarFunction {
701    /// String value of the enum field names used in the ProtoBuf definition.
702    ///
703    /// The values are not transformed in any way and thus are considered stable
704    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
705    pub fn as_str_name(&self) -> &'static str {
706        match self {
707            Self::Unspecified => "SCALAR_FUNCTION_UNSPECIFIED",
708            Self::Abs => "SCALAR_FUNCTION_ABS",
709            Self::Acos => "SCALAR_FUNCTION_ACOS",
710            Self::Asin => "SCALAR_FUNCTION_ASIN",
711            Self::Atan => "SCALAR_FUNCTION_ATAN",
712            Self::Ascii => "SCALAR_FUNCTION_ASCII",
713            Self::Ceil => "SCALAR_FUNCTION_CEIL",
714            Self::Cos => "SCALAR_FUNCTION_COS",
715            Self::Digest => "SCALAR_FUNCTION_DIGEST",
716            Self::Exp => "SCALAR_FUNCTION_EXP",
717            Self::Floor => "SCALAR_FUNCTION_FLOOR",
718            Self::Ln => "SCALAR_FUNCTION_LN",
719            Self::Log => "SCALAR_FUNCTION_LOG",
720            Self::Log10 => "SCALAR_FUNCTION_LOG10",
721            Self::Log2 => "SCALAR_FUNCTION_LOG2",
722            Self::Round => "SCALAR_FUNCTION_ROUND",
723            Self::Signum => "SCALAR_FUNCTION_SIGNUM",
724            Self::Sin => "SCALAR_FUNCTION_SIN",
725            Self::Sqrt => "SCALAR_FUNCTION_SQRT",
726            Self::Tan => "SCALAR_FUNCTION_TAN",
727            Self::Trunc => "SCALAR_FUNCTION_TRUNC",
728            Self::Array => "SCALAR_FUNCTION_ARRAY",
729            Self::RegexpMatch => "SCALAR_FUNCTION_REGEXP_MATCH",
730            Self::BitLength => "SCALAR_FUNCTION_BIT_LENGTH",
731            Self::Btrim => "SCALAR_FUNCTION_BTRIM",
732            Self::CharacterLength => "SCALAR_FUNCTION_CHARACTER_LENGTH",
733            Self::Chr => "SCALAR_FUNCTION_CHR",
734            Self::Concat => "SCALAR_FUNCTION_CONCAT",
735            Self::ConcatWithSeparator => "SCALAR_FUNCTION_CONCAT_WITH_SEPARATOR",
736            Self::DatePart => "SCALAR_FUNCTION_DATE_PART",
737            Self::DateTrunc => "SCALAR_FUNCTION_DATE_TRUNC",
738            Self::InitCap => "SCALAR_FUNCTION_INIT_CAP",
739            Self::Left => "SCALAR_FUNCTION_LEFT",
740            Self::Lpad => "SCALAR_FUNCTION_LPAD",
741            Self::Lower => "SCALAR_FUNCTION_LOWER",
742            Self::Ltrim => "SCALAR_FUNCTION_LTRIM",
743            Self::Md5 => "SCALAR_FUNCTION_MD5",
744            Self::NullIf => "SCALAR_FUNCTION_NULL_IF",
745            Self::OctetLength => "SCALAR_FUNCTION_OCTET_LENGTH",
746            Self::Random => "SCALAR_FUNCTION_RANDOM",
747            Self::RegexpReplace => "SCALAR_FUNCTION_REGEXP_REPLACE",
748            Self::Repeat => "SCALAR_FUNCTION_REPEAT",
749            Self::Replace => "SCALAR_FUNCTION_REPLACE",
750            Self::Reverse => "SCALAR_FUNCTION_REVERSE",
751            Self::Right => "SCALAR_FUNCTION_RIGHT",
752            Self::Rpad => "SCALAR_FUNCTION_RPAD",
753            Self::Rtrim => "SCALAR_FUNCTION_RTRIM",
754            Self::Sha224 => "SCALAR_FUNCTION_SHA224",
755            Self::Sha256 => "SCALAR_FUNCTION_SHA256",
756            Self::Sha384 => "SCALAR_FUNCTION_SHA384",
757            Self::Sha512 => "SCALAR_FUNCTION_SHA512",
758            Self::SplitPart => "SCALAR_FUNCTION_SPLIT_PART",
759            Self::StartsWith => "SCALAR_FUNCTION_STARTS_WITH",
760            Self::Strpos => "SCALAR_FUNCTION_STRPOS",
761            Self::Substr => "SCALAR_FUNCTION_SUBSTR",
762            Self::ToHex => "SCALAR_FUNCTION_TO_HEX",
763            Self::ToTimestamp => "SCALAR_FUNCTION_TO_TIMESTAMP",
764            Self::ToTimestampMillis => "SCALAR_FUNCTION_TO_TIMESTAMP_MILLIS",
765            Self::ToTimestampMicros => "SCALAR_FUNCTION_TO_TIMESTAMP_MICROS",
766            Self::ToTimestampSeconds => "SCALAR_FUNCTION_TO_TIMESTAMP_SECONDS",
767            Self::Now => "SCALAR_FUNCTION_NOW",
768            Self::Translate => "SCALAR_FUNCTION_TRANSLATE",
769            Self::Trim => "SCALAR_FUNCTION_TRIM",
770            Self::Upper => "SCALAR_FUNCTION_UPPER",
771            Self::Coalesce => "SCALAR_FUNCTION_COALESCE",
772            Self::Power => "SCALAR_FUNCTION_POWER",
773            Self::StructFun => "SCALAR_FUNCTION_STRUCT_FUN",
774            Self::FromUnixtime => "SCALAR_FUNCTION_FROM_UNIXTIME",
775            Self::Atan2 => "SCALAR_FUNCTION_ATAN2",
776            Self::DateBin => "SCALAR_FUNCTION_DATE_BIN",
777            Self::ArrowTypeof => "SCALAR_FUNCTION_ARROW_TYPEOF",
778            Self::CurrentDate => "SCALAR_FUNCTION_CURRENT_DATE",
779            Self::CurrentTime => "SCALAR_FUNCTION_CURRENT_TIME",
780            Self::Uuid => "SCALAR_FUNCTION_UUID",
781            Self::Cbrt => "SCALAR_FUNCTION_CBRT",
782            Self::Acosh => "SCALAR_FUNCTION_ACOSH",
783            Self::Asinh => "SCALAR_FUNCTION_ASINH",
784            Self::Atanh => "SCALAR_FUNCTION_ATANH",
785            Self::Sinh => "SCALAR_FUNCTION_SINH",
786            Self::Cosh => "SCALAR_FUNCTION_COSH",
787            Self::Tanh => "SCALAR_FUNCTION_TANH",
788            Self::Pi => "SCALAR_FUNCTION_PI",
789            Self::Degrees => "SCALAR_FUNCTION_DEGREES",
790            Self::Radians => "SCALAR_FUNCTION_RADIANS",
791            Self::Factorial => "SCALAR_FUNCTION_FACTORIAL",
792            Self::Lcm => "SCALAR_FUNCTION_LCM",
793            Self::Gcd => "SCALAR_FUNCTION_GCD",
794            Self::ArrayAppend => "SCALAR_FUNCTION_ARRAY_APPEND",
795            Self::ArrayConcat => "SCALAR_FUNCTION_ARRAY_CONCAT",
796            Self::ArrayDims => "SCALAR_FUNCTION_ARRAY_DIMS",
797            Self::ArrayRepeat => "SCALAR_FUNCTION_ARRAY_REPEAT",
798            Self::ArrayLength => "SCALAR_FUNCTION_ARRAY_LENGTH",
799            Self::ArrayNdims => "SCALAR_FUNCTION_ARRAY_NDIMS",
800            Self::ArrayPosition => "SCALAR_FUNCTION_ARRAY_POSITION",
801            Self::ArrayPositions => "SCALAR_FUNCTION_ARRAY_POSITIONS",
802            Self::ArrayPrepend => "SCALAR_FUNCTION_ARRAY_PREPEND",
803            Self::ArrayRemove => "SCALAR_FUNCTION_ARRAY_REMOVE",
804            Self::ArrayReplace => "SCALAR_FUNCTION_ARRAY_REPLACE",
805            Self::ArrayToString => "SCALAR_FUNCTION_ARRAY_TO_STRING",
806            Self::Cardinality => "SCALAR_FUNCTION_CARDINALITY",
807            Self::ArrayElement => "SCALAR_FUNCTION_ARRAY_ELEMENT",
808            Self::ArraySlice => "SCALAR_FUNCTION_ARRAY_SLICE",
809            Self::Encode => "SCALAR_FUNCTION_ENCODE",
810            Self::Decode => "SCALAR_FUNCTION_DECODE",
811            Self::Cot => "SCALAR_FUNCTION_COT",
812            Self::ArrayHas => "SCALAR_FUNCTION_ARRAY_HAS",
813            Self::ArrayHasAny => "SCALAR_FUNCTION_ARRAY_HAS_ANY",
814            Self::ArrayHasAll => "SCALAR_FUNCTION_ARRAY_HAS_ALL",
815            Self::ArrayRemoveN => "SCALAR_FUNCTION_ARRAY_REMOVE_N",
816            Self::ArrayReplaceN => "SCALAR_FUNCTION_ARRAY_REPLACE_N",
817            Self::ArrayRemoveAll => "SCALAR_FUNCTION_ARRAY_REMOVE_ALL",
818            Self::ArrayReplaceAll => "SCALAR_FUNCTION_ARRAY_REPLACE_ALL",
819            Self::Nanvl => "SCALAR_FUNCTION_NANVL",
820            Self::Flatten => "SCALAR_FUNCTION_FLATTEN",
821            Self::Isnan => "SCALAR_FUNCTION_ISNAN",
822            Self::Iszero => "SCALAR_FUNCTION_ISZERO",
823            Self::ArrayEmpty => "SCALAR_FUNCTION_ARRAY_EMPTY",
824            Self::ArrayPopBack => "SCALAR_FUNCTION_ARRAY_POP_BACK",
825            Self::StringToArray => "SCALAR_FUNCTION_STRING_TO_ARRAY",
826            Self::ToTimestampNanos => "SCALAR_FUNCTION_TO_TIMESTAMP_NANOS",
827            Self::ArrayIntersect => "SCALAR_FUNCTION_ARRAY_INTERSECT",
828            Self::ArrayUnion => "SCALAR_FUNCTION_ARRAY_UNION",
829            Self::OverLay => "SCALAR_FUNCTION_OVER_LAY",
830            Self::Range => "SCALAR_FUNCTION_RANGE",
831            Self::ArrayExcept => "SCALAR_FUNCTION_ARRAY_EXCEPT",
832            Self::ArrayPopFront => "SCALAR_FUNCTION_ARRAY_POP_FRONT",
833            Self::Levenshtein => "SCALAR_FUNCTION_LEVENSHTEIN",
834            Self::SubstrIndex => "SCALAR_FUNCTION_SUBSTR_INDEX",
835            Self::FindInSet => "SCALAR_FUNCTION_FIND_IN_SET",
836            Self::ArraySort => "SCALAR_FUNCTION_ARRAY_SORT",
837            Self::ArrayDistinct => "SCALAR_FUNCTION_ARRAY_DISTINCT",
838        }
839    }
840    /// Creates an enum from field names used in the ProtoBuf definition.
841    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
842        match value {
843            "SCALAR_FUNCTION_UNSPECIFIED" => Some(Self::Unspecified),
844            "SCALAR_FUNCTION_ABS" => Some(Self::Abs),
845            "SCALAR_FUNCTION_ACOS" => Some(Self::Acos),
846            "SCALAR_FUNCTION_ASIN" => Some(Self::Asin),
847            "SCALAR_FUNCTION_ATAN" => Some(Self::Atan),
848            "SCALAR_FUNCTION_ASCII" => Some(Self::Ascii),
849            "SCALAR_FUNCTION_CEIL" => Some(Self::Ceil),
850            "SCALAR_FUNCTION_COS" => Some(Self::Cos),
851            "SCALAR_FUNCTION_DIGEST" => Some(Self::Digest),
852            "SCALAR_FUNCTION_EXP" => Some(Self::Exp),
853            "SCALAR_FUNCTION_FLOOR" => Some(Self::Floor),
854            "SCALAR_FUNCTION_LN" => Some(Self::Ln),
855            "SCALAR_FUNCTION_LOG" => Some(Self::Log),
856            "SCALAR_FUNCTION_LOG10" => Some(Self::Log10),
857            "SCALAR_FUNCTION_LOG2" => Some(Self::Log2),
858            "SCALAR_FUNCTION_ROUND" => Some(Self::Round),
859            "SCALAR_FUNCTION_SIGNUM" => Some(Self::Signum),
860            "SCALAR_FUNCTION_SIN" => Some(Self::Sin),
861            "SCALAR_FUNCTION_SQRT" => Some(Self::Sqrt),
862            "SCALAR_FUNCTION_TAN" => Some(Self::Tan),
863            "SCALAR_FUNCTION_TRUNC" => Some(Self::Trunc),
864            "SCALAR_FUNCTION_ARRAY" => Some(Self::Array),
865            "SCALAR_FUNCTION_REGEXP_MATCH" => Some(Self::RegexpMatch),
866            "SCALAR_FUNCTION_BIT_LENGTH" => Some(Self::BitLength),
867            "SCALAR_FUNCTION_BTRIM" => Some(Self::Btrim),
868            "SCALAR_FUNCTION_CHARACTER_LENGTH" => Some(Self::CharacterLength),
869            "SCALAR_FUNCTION_CHR" => Some(Self::Chr),
870            "SCALAR_FUNCTION_CONCAT" => Some(Self::Concat),
871            "SCALAR_FUNCTION_CONCAT_WITH_SEPARATOR" => Some(Self::ConcatWithSeparator),
872            "SCALAR_FUNCTION_DATE_PART" => Some(Self::DatePart),
873            "SCALAR_FUNCTION_DATE_TRUNC" => Some(Self::DateTrunc),
874            "SCALAR_FUNCTION_INIT_CAP" => Some(Self::InitCap),
875            "SCALAR_FUNCTION_LEFT" => Some(Self::Left),
876            "SCALAR_FUNCTION_LPAD" => Some(Self::Lpad),
877            "SCALAR_FUNCTION_LOWER" => Some(Self::Lower),
878            "SCALAR_FUNCTION_LTRIM" => Some(Self::Ltrim),
879            "SCALAR_FUNCTION_MD5" => Some(Self::Md5),
880            "SCALAR_FUNCTION_NULL_IF" => Some(Self::NullIf),
881            "SCALAR_FUNCTION_OCTET_LENGTH" => Some(Self::OctetLength),
882            "SCALAR_FUNCTION_RANDOM" => Some(Self::Random),
883            "SCALAR_FUNCTION_REGEXP_REPLACE" => Some(Self::RegexpReplace),
884            "SCALAR_FUNCTION_REPEAT" => Some(Self::Repeat),
885            "SCALAR_FUNCTION_REPLACE" => Some(Self::Replace),
886            "SCALAR_FUNCTION_REVERSE" => Some(Self::Reverse),
887            "SCALAR_FUNCTION_RIGHT" => Some(Self::Right),
888            "SCALAR_FUNCTION_RPAD" => Some(Self::Rpad),
889            "SCALAR_FUNCTION_RTRIM" => Some(Self::Rtrim),
890            "SCALAR_FUNCTION_SHA224" => Some(Self::Sha224),
891            "SCALAR_FUNCTION_SHA256" => Some(Self::Sha256),
892            "SCALAR_FUNCTION_SHA384" => Some(Self::Sha384),
893            "SCALAR_FUNCTION_SHA512" => Some(Self::Sha512),
894            "SCALAR_FUNCTION_SPLIT_PART" => Some(Self::SplitPart),
895            "SCALAR_FUNCTION_STARTS_WITH" => Some(Self::StartsWith),
896            "SCALAR_FUNCTION_STRPOS" => Some(Self::Strpos),
897            "SCALAR_FUNCTION_SUBSTR" => Some(Self::Substr),
898            "SCALAR_FUNCTION_TO_HEX" => Some(Self::ToHex),
899            "SCALAR_FUNCTION_TO_TIMESTAMP" => Some(Self::ToTimestamp),
900            "SCALAR_FUNCTION_TO_TIMESTAMP_MILLIS" => Some(Self::ToTimestampMillis),
901            "SCALAR_FUNCTION_TO_TIMESTAMP_MICROS" => Some(Self::ToTimestampMicros),
902            "SCALAR_FUNCTION_TO_TIMESTAMP_SECONDS" => Some(Self::ToTimestampSeconds),
903            "SCALAR_FUNCTION_NOW" => Some(Self::Now),
904            "SCALAR_FUNCTION_TRANSLATE" => Some(Self::Translate),
905            "SCALAR_FUNCTION_TRIM" => Some(Self::Trim),
906            "SCALAR_FUNCTION_UPPER" => Some(Self::Upper),
907            "SCALAR_FUNCTION_COALESCE" => Some(Self::Coalesce),
908            "SCALAR_FUNCTION_POWER" => Some(Self::Power),
909            "SCALAR_FUNCTION_STRUCT_FUN" => Some(Self::StructFun),
910            "SCALAR_FUNCTION_FROM_UNIXTIME" => Some(Self::FromUnixtime),
911            "SCALAR_FUNCTION_ATAN2" => Some(Self::Atan2),
912            "SCALAR_FUNCTION_DATE_BIN" => Some(Self::DateBin),
913            "SCALAR_FUNCTION_ARROW_TYPEOF" => Some(Self::ArrowTypeof),
914            "SCALAR_FUNCTION_CURRENT_DATE" => Some(Self::CurrentDate),
915            "SCALAR_FUNCTION_CURRENT_TIME" => Some(Self::CurrentTime),
916            "SCALAR_FUNCTION_UUID" => Some(Self::Uuid),
917            "SCALAR_FUNCTION_CBRT" => Some(Self::Cbrt),
918            "SCALAR_FUNCTION_ACOSH" => Some(Self::Acosh),
919            "SCALAR_FUNCTION_ASINH" => Some(Self::Asinh),
920            "SCALAR_FUNCTION_ATANH" => Some(Self::Atanh),
921            "SCALAR_FUNCTION_SINH" => Some(Self::Sinh),
922            "SCALAR_FUNCTION_COSH" => Some(Self::Cosh),
923            "SCALAR_FUNCTION_TANH" => Some(Self::Tanh),
924            "SCALAR_FUNCTION_PI" => Some(Self::Pi),
925            "SCALAR_FUNCTION_DEGREES" => Some(Self::Degrees),
926            "SCALAR_FUNCTION_RADIANS" => Some(Self::Radians),
927            "SCALAR_FUNCTION_FACTORIAL" => Some(Self::Factorial),
928            "SCALAR_FUNCTION_LCM" => Some(Self::Lcm),
929            "SCALAR_FUNCTION_GCD" => Some(Self::Gcd),
930            "SCALAR_FUNCTION_ARRAY_APPEND" => Some(Self::ArrayAppend),
931            "SCALAR_FUNCTION_ARRAY_CONCAT" => Some(Self::ArrayConcat),
932            "SCALAR_FUNCTION_ARRAY_DIMS" => Some(Self::ArrayDims),
933            "SCALAR_FUNCTION_ARRAY_REPEAT" => Some(Self::ArrayRepeat),
934            "SCALAR_FUNCTION_ARRAY_LENGTH" => Some(Self::ArrayLength),
935            "SCALAR_FUNCTION_ARRAY_NDIMS" => Some(Self::ArrayNdims),
936            "SCALAR_FUNCTION_ARRAY_POSITION" => Some(Self::ArrayPosition),
937            "SCALAR_FUNCTION_ARRAY_POSITIONS" => Some(Self::ArrayPositions),
938            "SCALAR_FUNCTION_ARRAY_PREPEND" => Some(Self::ArrayPrepend),
939            "SCALAR_FUNCTION_ARRAY_REMOVE" => Some(Self::ArrayRemove),
940            "SCALAR_FUNCTION_ARRAY_REPLACE" => Some(Self::ArrayReplace),
941            "SCALAR_FUNCTION_ARRAY_TO_STRING" => Some(Self::ArrayToString),
942            "SCALAR_FUNCTION_CARDINALITY" => Some(Self::Cardinality),
943            "SCALAR_FUNCTION_ARRAY_ELEMENT" => Some(Self::ArrayElement),
944            "SCALAR_FUNCTION_ARRAY_SLICE" => Some(Self::ArraySlice),
945            "SCALAR_FUNCTION_ENCODE" => Some(Self::Encode),
946            "SCALAR_FUNCTION_DECODE" => Some(Self::Decode),
947            "SCALAR_FUNCTION_COT" => Some(Self::Cot),
948            "SCALAR_FUNCTION_ARRAY_HAS" => Some(Self::ArrayHas),
949            "SCALAR_FUNCTION_ARRAY_HAS_ANY" => Some(Self::ArrayHasAny),
950            "SCALAR_FUNCTION_ARRAY_HAS_ALL" => Some(Self::ArrayHasAll),
951            "SCALAR_FUNCTION_ARRAY_REMOVE_N" => Some(Self::ArrayRemoveN),
952            "SCALAR_FUNCTION_ARRAY_REPLACE_N" => Some(Self::ArrayReplaceN),
953            "SCALAR_FUNCTION_ARRAY_REMOVE_ALL" => Some(Self::ArrayRemoveAll),
954            "SCALAR_FUNCTION_ARRAY_REPLACE_ALL" => Some(Self::ArrayReplaceAll),
955            "SCALAR_FUNCTION_NANVL" => Some(Self::Nanvl),
956            "SCALAR_FUNCTION_FLATTEN" => Some(Self::Flatten),
957            "SCALAR_FUNCTION_ISNAN" => Some(Self::Isnan),
958            "SCALAR_FUNCTION_ISZERO" => Some(Self::Iszero),
959            "SCALAR_FUNCTION_ARRAY_EMPTY" => Some(Self::ArrayEmpty),
960            "SCALAR_FUNCTION_ARRAY_POP_BACK" => Some(Self::ArrayPopBack),
961            "SCALAR_FUNCTION_STRING_TO_ARRAY" => Some(Self::StringToArray),
962            "SCALAR_FUNCTION_TO_TIMESTAMP_NANOS" => Some(Self::ToTimestampNanos),
963            "SCALAR_FUNCTION_ARRAY_INTERSECT" => Some(Self::ArrayIntersect),
964            "SCALAR_FUNCTION_ARRAY_UNION" => Some(Self::ArrayUnion),
965            "SCALAR_FUNCTION_OVER_LAY" => Some(Self::OverLay),
966            "SCALAR_FUNCTION_RANGE" => Some(Self::Range),
967            "SCALAR_FUNCTION_ARRAY_EXCEPT" => Some(Self::ArrayExcept),
968            "SCALAR_FUNCTION_ARRAY_POP_FRONT" => Some(Self::ArrayPopFront),
969            "SCALAR_FUNCTION_LEVENSHTEIN" => Some(Self::Levenshtein),
970            "SCALAR_FUNCTION_SUBSTR_INDEX" => Some(Self::SubstrIndex),
971            "SCALAR_FUNCTION_FIND_IN_SET" => Some(Self::FindInSet),
972            "SCALAR_FUNCTION_ARRAY_SORT" => Some(Self::ArraySort),
973            "SCALAR_FUNCTION_ARRAY_DISTINCT" => Some(Self::ArrayDistinct),
974            _ => None,
975        }
976    }
977}
978#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
979#[repr(i32)]
980pub enum AggregateFunction {
981    Unspecified = 0,
982    Min = 1,
983    Max = 2,
984    Sum = 3,
985    Avg = 4,
986    Count = 5,
987    ApproxDistinct = 6,
988    Array = 7,
989    Variance = 8,
990    VariancePop = 9,
991    Covariance = 10,
992    CovariancePop = 11,
993    Stddev = 12,
994    StddevPop = 13,
995    Correlation = 14,
996    ApproxPercentileCont = 15,
997    ApproxMedian = 16,
998    ApproxPercentileContWithWeight = 17,
999    Grouping = 18,
1000    Median = 19,
1001    BitAnd = 20,
1002    BitOr = 21,
1003    BitXor = 22,
1004    BoolAnd = 23,
1005    BoolOr = 24,
1006    FirstValue = 25,
1007    LastValue = 26,
1008    RegrSlope = 27,
1009    RegrIntercept = 28,
1010    RegrCount = 29,
1011    RegrR2 = 30,
1012    RegrAvgx = 31,
1013    RegrAvgy = 32,
1014    RegrSxx = 33,
1015    RegrSyy = 34,
1016    RegrSxy = 35,
1017    String = 36,
1018}
1019impl AggregateFunction {
1020    /// String value of the enum field names used in the ProtoBuf definition.
1021    ///
1022    /// The values are not transformed in any way and thus are considered stable
1023    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1024    pub fn as_str_name(&self) -> &'static str {
1025        match self {
1026            Self::Unspecified => "AGGREGATE_FUNCTION_UNSPECIFIED",
1027            Self::Min => "AGGREGATE_FUNCTION_MIN",
1028            Self::Max => "AGGREGATE_FUNCTION_MAX",
1029            Self::Sum => "AGGREGATE_FUNCTION_SUM",
1030            Self::Avg => "AGGREGATE_FUNCTION_AVG",
1031            Self::Count => "AGGREGATE_FUNCTION_COUNT",
1032            Self::ApproxDistinct => "AGGREGATE_FUNCTION_APPROX_DISTINCT",
1033            Self::Array => "AGGREGATE_FUNCTION_ARRAY",
1034            Self::Variance => "AGGREGATE_FUNCTION_VARIANCE",
1035            Self::VariancePop => "AGGREGATE_FUNCTION_VARIANCE_POP",
1036            Self::Covariance => "AGGREGATE_FUNCTION_COVARIANCE",
1037            Self::CovariancePop => "AGGREGATE_FUNCTION_COVARIANCE_POP",
1038            Self::Stddev => "AGGREGATE_FUNCTION_STDDEV",
1039            Self::StddevPop => "AGGREGATE_FUNCTION_STDDEV_POP",
1040            Self::Correlation => "AGGREGATE_FUNCTION_CORRELATION",
1041            Self::ApproxPercentileCont => "AGGREGATE_FUNCTION_APPROX_PERCENTILE_CONT",
1042            Self::ApproxMedian => "AGGREGATE_FUNCTION_APPROX_MEDIAN",
1043            Self::ApproxPercentileContWithWeight => {
1044                "AGGREGATE_FUNCTION_APPROX_PERCENTILE_CONT_WITH_WEIGHT"
1045            }
1046            Self::Grouping => "AGGREGATE_FUNCTION_GROUPING",
1047            Self::Median => "AGGREGATE_FUNCTION_MEDIAN",
1048            Self::BitAnd => "AGGREGATE_FUNCTION_BIT_AND",
1049            Self::BitOr => "AGGREGATE_FUNCTION_BIT_OR",
1050            Self::BitXor => "AGGREGATE_FUNCTION_BIT_XOR",
1051            Self::BoolAnd => "AGGREGATE_FUNCTION_BOOL_AND",
1052            Self::BoolOr => "AGGREGATE_FUNCTION_BOOL_OR",
1053            Self::FirstValue => "AGGREGATE_FUNCTION_FIRST_VALUE",
1054            Self::LastValue => "AGGREGATE_FUNCTION_LAST_VALUE",
1055            Self::RegrSlope => "AGGREGATE_FUNCTION_REGR_SLOPE",
1056            Self::RegrIntercept => "AGGREGATE_FUNCTION_REGR_INTERCEPT",
1057            Self::RegrCount => "AGGREGATE_FUNCTION_REGR_COUNT",
1058            Self::RegrR2 => "AGGREGATE_FUNCTION_REGR_R2",
1059            Self::RegrAvgx => "AGGREGATE_FUNCTION_REGR_AVGX",
1060            Self::RegrAvgy => "AGGREGATE_FUNCTION_REGR_AVGY",
1061            Self::RegrSxx => "AGGREGATE_FUNCTION_REGR_SXX",
1062            Self::RegrSyy => "AGGREGATE_FUNCTION_REGR_SYY",
1063            Self::RegrSxy => "AGGREGATE_FUNCTION_REGR_SXY",
1064            Self::String => "AGGREGATE_FUNCTION_STRING",
1065        }
1066    }
1067    /// Creates an enum from field names used in the ProtoBuf definition.
1068    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1069        match value {
1070            "AGGREGATE_FUNCTION_UNSPECIFIED" => Some(Self::Unspecified),
1071            "AGGREGATE_FUNCTION_MIN" => Some(Self::Min),
1072            "AGGREGATE_FUNCTION_MAX" => Some(Self::Max),
1073            "AGGREGATE_FUNCTION_SUM" => Some(Self::Sum),
1074            "AGGREGATE_FUNCTION_AVG" => Some(Self::Avg),
1075            "AGGREGATE_FUNCTION_COUNT" => Some(Self::Count),
1076            "AGGREGATE_FUNCTION_APPROX_DISTINCT" => Some(Self::ApproxDistinct),
1077            "AGGREGATE_FUNCTION_ARRAY" => Some(Self::Array),
1078            "AGGREGATE_FUNCTION_VARIANCE" => Some(Self::Variance),
1079            "AGGREGATE_FUNCTION_VARIANCE_POP" => Some(Self::VariancePop),
1080            "AGGREGATE_FUNCTION_COVARIANCE" => Some(Self::Covariance),
1081            "AGGREGATE_FUNCTION_COVARIANCE_POP" => Some(Self::CovariancePop),
1082            "AGGREGATE_FUNCTION_STDDEV" => Some(Self::Stddev),
1083            "AGGREGATE_FUNCTION_STDDEV_POP" => Some(Self::StddevPop),
1084            "AGGREGATE_FUNCTION_CORRELATION" => Some(Self::Correlation),
1085            "AGGREGATE_FUNCTION_APPROX_PERCENTILE_CONT" => {
1086                Some(Self::ApproxPercentileCont)
1087            }
1088            "AGGREGATE_FUNCTION_APPROX_MEDIAN" => Some(Self::ApproxMedian),
1089            "AGGREGATE_FUNCTION_APPROX_PERCENTILE_CONT_WITH_WEIGHT" => {
1090                Some(Self::ApproxPercentileContWithWeight)
1091            }
1092            "AGGREGATE_FUNCTION_GROUPING" => Some(Self::Grouping),
1093            "AGGREGATE_FUNCTION_MEDIAN" => Some(Self::Median),
1094            "AGGREGATE_FUNCTION_BIT_AND" => Some(Self::BitAnd),
1095            "AGGREGATE_FUNCTION_BIT_OR" => Some(Self::BitOr),
1096            "AGGREGATE_FUNCTION_BIT_XOR" => Some(Self::BitXor),
1097            "AGGREGATE_FUNCTION_BOOL_AND" => Some(Self::BoolAnd),
1098            "AGGREGATE_FUNCTION_BOOL_OR" => Some(Self::BoolOr),
1099            "AGGREGATE_FUNCTION_FIRST_VALUE" => Some(Self::FirstValue),
1100            "AGGREGATE_FUNCTION_LAST_VALUE" => Some(Self::LastValue),
1101            "AGGREGATE_FUNCTION_REGR_SLOPE" => Some(Self::RegrSlope),
1102            "AGGREGATE_FUNCTION_REGR_INTERCEPT" => Some(Self::RegrIntercept),
1103            "AGGREGATE_FUNCTION_REGR_COUNT" => Some(Self::RegrCount),
1104            "AGGREGATE_FUNCTION_REGR_R2" => Some(Self::RegrR2),
1105            "AGGREGATE_FUNCTION_REGR_AVGX" => Some(Self::RegrAvgx),
1106            "AGGREGATE_FUNCTION_REGR_AVGY" => Some(Self::RegrAvgy),
1107            "AGGREGATE_FUNCTION_REGR_SXX" => Some(Self::RegrSxx),
1108            "AGGREGATE_FUNCTION_REGR_SYY" => Some(Self::RegrSyy),
1109            "AGGREGATE_FUNCTION_REGR_SXY" => Some(Self::RegrSxy),
1110            "AGGREGATE_FUNCTION_STRING" => Some(Self::String),
1111            _ => None,
1112        }
1113    }
1114}
1115#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1116#[repr(i32)]
1117pub enum BuiltInWindowFunction {
1118    Unspecified = 0,
1119    RowNumber = 1,
1120    Rank = 2,
1121    DenseRank = 3,
1122    PercentRank = 4,
1123    CumeDist = 5,
1124    Ntile = 6,
1125    Lag = 7,
1126    Lead = 8,
1127    FirstValue = 9,
1128    LastValue = 10,
1129    NthValue = 11,
1130}
1131impl BuiltInWindowFunction {
1132    /// String value of the enum field names used in the ProtoBuf definition.
1133    ///
1134    /// The values are not transformed in any way and thus are considered stable
1135    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1136    pub fn as_str_name(&self) -> &'static str {
1137        match self {
1138            Self::Unspecified => "BUILT_IN_WINDOW_FUNCTION_UNSPECIFIED",
1139            Self::RowNumber => "BUILT_IN_WINDOW_FUNCTION_ROW_NUMBER",
1140            Self::Rank => "BUILT_IN_WINDOW_FUNCTION_RANK",
1141            Self::DenseRank => "BUILT_IN_WINDOW_FUNCTION_DENSE_RANK",
1142            Self::PercentRank => "BUILT_IN_WINDOW_FUNCTION_PERCENT_RANK",
1143            Self::CumeDist => "BUILT_IN_WINDOW_FUNCTION_CUME_DIST",
1144            Self::Ntile => "BUILT_IN_WINDOW_FUNCTION_NTILE",
1145            Self::Lag => "BUILT_IN_WINDOW_FUNCTION_LAG",
1146            Self::Lead => "BUILT_IN_WINDOW_FUNCTION_LEAD",
1147            Self::FirstValue => "BUILT_IN_WINDOW_FUNCTION_FIRST_VALUE",
1148            Self::LastValue => "BUILT_IN_WINDOW_FUNCTION_LAST_VALUE",
1149            Self::NthValue => "BUILT_IN_WINDOW_FUNCTION_NTH_VALUE",
1150        }
1151    }
1152    /// Creates an enum from field names used in the ProtoBuf definition.
1153    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1154        match value {
1155            "BUILT_IN_WINDOW_FUNCTION_UNSPECIFIED" => Some(Self::Unspecified),
1156            "BUILT_IN_WINDOW_FUNCTION_ROW_NUMBER" => Some(Self::RowNumber),
1157            "BUILT_IN_WINDOW_FUNCTION_RANK" => Some(Self::Rank),
1158            "BUILT_IN_WINDOW_FUNCTION_DENSE_RANK" => Some(Self::DenseRank),
1159            "BUILT_IN_WINDOW_FUNCTION_PERCENT_RANK" => Some(Self::PercentRank),
1160            "BUILT_IN_WINDOW_FUNCTION_CUME_DIST" => Some(Self::CumeDist),
1161            "BUILT_IN_WINDOW_FUNCTION_NTILE" => Some(Self::Ntile),
1162            "BUILT_IN_WINDOW_FUNCTION_LAG" => Some(Self::Lag),
1163            "BUILT_IN_WINDOW_FUNCTION_LEAD" => Some(Self::Lead),
1164            "BUILT_IN_WINDOW_FUNCTION_FIRST_VALUE" => Some(Self::FirstValue),
1165            "BUILT_IN_WINDOW_FUNCTION_LAST_VALUE" => Some(Self::LastValue),
1166            "BUILT_IN_WINDOW_FUNCTION_NTH_VALUE" => Some(Self::NthValue),
1167            _ => None,
1168        }
1169    }
1170}
1171#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1172#[repr(i32)]
1173pub enum WindowFrameUnits {
1174    Unspecified = 0,
1175    Rows = 1,
1176    Range = 2,
1177    Groups = 3,
1178}
1179impl WindowFrameUnits {
1180    /// String value of the enum field names used in the ProtoBuf definition.
1181    ///
1182    /// The values are not transformed in any way and thus are considered stable
1183    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1184    pub fn as_str_name(&self) -> &'static str {
1185        match self {
1186            Self::Unspecified => "WINDOW_FRAME_UNITS_UNSPECIFIED",
1187            Self::Rows => "WINDOW_FRAME_UNITS_ROWS",
1188            Self::Range => "WINDOW_FRAME_UNITS_RANGE",
1189            Self::Groups => "WINDOW_FRAME_UNITS_GROUPS",
1190        }
1191    }
1192    /// Creates an enum from field names used in the ProtoBuf definition.
1193    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1194        match value {
1195            "WINDOW_FRAME_UNITS_UNSPECIFIED" => Some(Self::Unspecified),
1196            "WINDOW_FRAME_UNITS_ROWS" => Some(Self::Rows),
1197            "WINDOW_FRAME_UNITS_RANGE" => Some(Self::Range),
1198            "WINDOW_FRAME_UNITS_GROUPS" => Some(Self::Groups),
1199            _ => None,
1200        }
1201    }
1202}
1203#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1204#[repr(i32)]
1205pub enum WindowFrameBoundType {
1206    Unspecified = 0,
1207    CurrentRow = 1,
1208    Preceding = 2,
1209    Following = 3,
1210}
1211impl WindowFrameBoundType {
1212    /// String value of the enum field names used in the ProtoBuf definition.
1213    ///
1214    /// The values are not transformed in any way and thus are considered stable
1215    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1216    pub fn as_str_name(&self) -> &'static str {
1217        match self {
1218            Self::Unspecified => "WINDOW_FRAME_BOUND_TYPE_UNSPECIFIED",
1219            Self::CurrentRow => "WINDOW_FRAME_BOUND_TYPE_CURRENT_ROW",
1220            Self::Preceding => "WINDOW_FRAME_BOUND_TYPE_PRECEDING",
1221            Self::Following => "WINDOW_FRAME_BOUND_TYPE_FOLLOWING",
1222        }
1223    }
1224    /// Creates an enum from field names used in the ProtoBuf definition.
1225    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1226        match value {
1227            "WINDOW_FRAME_BOUND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1228            "WINDOW_FRAME_BOUND_TYPE_CURRENT_ROW" => Some(Self::CurrentRow),
1229            "WINDOW_FRAME_BOUND_TYPE_PRECEDING" => Some(Self::Preceding),
1230            "WINDOW_FRAME_BOUND_TYPE_FOLLOWING" => Some(Self::Following),
1231            _ => None,
1232        }
1233    }
1234}