1#[derive(prost_helpers::AnyPB)]
3#[derive(Eq, Hash)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct ExprNode {
6 #[prost(enumeration = "expr_node::Type", tag = "1")]
8 pub function_type: i32,
9 #[prost(message, optional, tag = "3")]
10 pub return_type: ::core::option::Option<super::data::DataType>,
11 #[prost(oneof = "expr_node::RexNode", tags = "4, 5, 6, 7, 8")]
12 pub rex_node: ::core::option::Option<expr_node::RexNode>,
13}
14pub mod expr_node {
16 #[derive(prost_helpers::AnyPB)]
17 #[derive(Eq, Hash)]
18 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
19 pub struct NowRexNode {}
20 #[derive(prost_helpers::AnyPB)]
22 #[derive(
23 Clone,
24 Copy,
25 Debug,
26 PartialEq,
27 Eq,
28 Hash,
29 PartialOrd,
30 Ord,
31 ::prost::Enumeration
32 )]
33 #[repr(i32)]
34 pub enum Type {
35 Unspecified = 0,
37 Add = 3,
39 Subtract = 4,
40 Multiply = 5,
41 Divide = 6,
42 Modulus = 7,
43 Equal = 8,
45 NotEqual = 9,
46 LessThan = 10,
47 LessThanOrEqual = 11,
48 GreaterThan = 12,
49 GreaterThanOrEqual = 13,
50 Greatest = 14,
51 Least = 15,
52 And = 21,
54 Or = 22,
55 Not = 23,
56 In = 24,
57 Some = 25,
58 All = 26,
59 BitwiseAnd = 31,
61 BitwiseOr = 32,
62 BitwiseXor = 33,
63 BitwiseNot = 34,
64 BitwiseShiftLeft = 35,
65 BitwiseShiftRight = 36,
66 Extract = 101,
68 DatePart = 102,
69 TumbleStart = 103,
70 MakeDate = 113,
71 MakeTime = 114,
72 MakeTimestamp = 115,
73 DateBin = 116,
74 SecToTimestamptz = 104,
77 AtTimeZone = 105,
78 DateTrunc = 106,
79 CharToTimestamptz = 107,
82 CharToDate = 111,
83 CastWithTimeZone = 108,
85 AddWithTimeZone = 109,
86 SubtractWithTimeZone = 110,
87 MakeTimestamptz = 112,
88 Cast = 201,
90 Substr = 202,
91 Length = 203,
92 Like = 204,
93 ILike = 279,
94 SimilarToEscape = 284,
95 Upper = 205,
96 Lower = 206,
97 Trim = 207,
98 Replace = 208,
99 Position = 209,
100 Ltrim = 210,
101 Rtrim = 211,
102 Case = 212,
103 ConstantLookup = 624,
106 RoundDigit = 213,
108 Round = 214,
111 Ascii = 215,
112 Translate = 216,
113 Coalesce = 217,
114 ConcatWs = 218,
115 ConcatWsVariadic = 285,
116 Abs = 219,
117 SplitPart = 220,
118 Ceil = 221,
119 Floor = 222,
120 ToChar = 223,
121 Md5 = 224,
122 CharLength = 225,
123 Repeat = 226,
124 ConcatOp = 227,
125 ByteaConcatOp = 290,
126 Concat = 286,
127 ConcatVariadic = 287,
128 BoolOut = 228,
130 OctetLength = 229,
131 BitLength = 230,
132 Overlay = 231,
133 RegexpMatch = 232,
134 RegexpReplace = 280,
135 RegexpCount = 281,
136 RegexpSplitToArray = 282,
137 RegexpEq = 283,
138 Pow = 233,
139 Exp = 234,
140 Chr = 235,
141 StartsWith = 236,
142 Initcap = 237,
143 Lpad = 238,
144 Rpad = 239,
145 Reverse = 240,
146 Strpos = 241,
148 ToAscii = 242,
149 ToHex = 243,
150 QuoteIdent = 244,
151 Sin = 245,
152 Cos = 246,
153 Tan = 247,
154 Cot = 248,
155 Asin = 249,
156 Acos = 250,
157 Atan = 251,
158 Atan2 = 252,
159 Sind = 253,
160 Cosd = 254,
161 Cotd = 255,
162 Tand = 256,
163 Asind = 257,
164 Sqrt = 258,
165 Degrees = 259,
166 Radians = 260,
167 Cosh = 261,
168 Tanh = 262,
169 Coth = 263,
170 Asinh = 264,
171 Acosh = 265,
172 Atanh = 266,
173 Sinh = 267,
174 Acosd = 268,
175 Atand = 269,
176 Atan2d = 270,
177 Trunc = 271,
178 Ln = 272,
179 Log10 = 273,
180 Cbrt = 274,
181 Sign = 275,
182 Scale = 276,
183 MinScale = 277,
184 TrimScale = 278,
185 IsTrue = 301,
187 IsNotTrue = 302,
188 IsFalse = 303,
189 IsNotFalse = 304,
190 IsNull = 305,
191 IsNotNull = 306,
192 IsDistinctFrom = 307,
193 IsNotDistinctFrom = 308,
194 Encode = 310,
196 Decode = 311,
197 Sha1 = 312,
198 Sha224 = 313,
199 Sha256 = 314,
200 Sha384 = 315,
201 Sha512 = 316,
202 Left = 317,
203 Right = 318,
204 Format = 319,
205 FormatVariadic = 326,
206 PgwireSend = 320,
207 PgwireRecv = 321,
208 ConvertFrom = 322,
209 ConvertTo = 323,
210 Decrypt = 324,
211 Encrypt = 325,
212 InetAton = 328,
213 InetNtoa = 329,
214 QuoteLiteral = 330,
215 QuoteNullable = 331,
216 Hmac = 332,
217 SecureCompare = 333,
218 CheckNotNull = 350,
220 Neg = 401,
222 Field = 501,
224 Array = 521,
226 ArrayAccess = 522,
227 Row = 523,
228 ArrayToString = 524,
229 ArrayRangeAccess = 525,
230 ArrayCat = 531,
232 ArrayAppend = 532,
233 ArrayPrepend = 533,
234 FormatType = 534,
235 ArrayDistinct = 535,
236 ArrayLength = 536,
237 Cardinality = 537,
238 ArrayRemove = 538,
239 ArrayPositions = 539,
240 TrimArray = 540,
241 StringToArray = 541,
242 ArrayPosition = 542,
243 ArrayReplace = 543,
244 ArrayDims = 544,
245 ArrayTransform = 545,
246 ArrayMin = 546,
247 ArrayMax = 547,
248 ArraySum = 548,
249 ArraySort = 549,
250 ArrayContains = 550,
251 ArrayContained = 551,
252 ArrayFlatten = 552,
253 HexToInt256 = 560,
255 JsonbAccess = 600,
257 JsonbAccessStr = 601,
259 JsonbExtractPath = 627,
261 JsonbExtractPathVariadic = 613,
262 JsonbExtractPathText = 628,
264 JsonbExtractPathTextVariadic = 614,
265 JsonbTypeof = 602,
266 JsonbArrayLength = 603,
267 IsJson = 604,
268 JsonbConcat = 605,
269 JsonbObject = 606,
270 JsonbPretty = 607,
271 JsonbContains = 608,
273 JsonbContained = 609,
275 JsonbExists = 610,
277 JsonbExistsAny = 611,
279 JsonbExistsAll = 612,
281 JsonbDeletePath = 615,
288 JsonbStripNulls = 616,
289 ToJsonb = 617,
290 JsonbBuildArray = 618,
291 JsonbBuildArrayVariadic = 625,
292 JsonbBuildObject = 619,
293 JsonbBuildObjectVariadic = 626,
294 JsonbPathExists = 620,
295 JsonbPathMatch = 621,
296 JsonbPathQueryArray = 622,
297 JsonbPathQueryFirst = 623,
298 JsonbPopulateRecord = 629,
299 JsonbToRecord = 630,
300 JsonbSet = 631,
301 JsonbPopulateMap = 632,
302 JsonbToArray = 633,
303 MapFromEntries = 700,
305 MapAccess = 701,
306 MapKeys = 702,
307 MapValues = 703,
308 MapEntries = 704,
309 MapFromKeyValues = 705,
310 MapLength = 706,
311 MapContains = 707,
312 MapCat = 708,
313 MapInsert = 709,
314 MapDelete = 710,
315 MapFilter = 711,
316 L2Distance = 750,
318 CosineDistance = 751,
319 L1Distance = 752,
320 InnerProduct = 753,
321 VecConcat = 754,
322 L2Norm = 755,
323 L2Normalize = 756,
324 CompositeCast = 800,
326 Vnode = 1101,
330 TestFeature = 1102,
331 VnodeUser = 1103,
332 License = 1104,
333 Proctime = 2023,
335 PgSleep = 2024,
336 PgSleepFor = 2025,
337 PgSleepUntil = 2026,
338 Random = 2027,
339 CastRegclass = 2100,
341 PgGetIndexdef = 2400,
343 ColDescription = 2401,
344 PgGetViewdef = 2402,
345 PgGetUserbyid = 2403,
346 PgIndexesSize = 2404,
347 PgRelationSize = 2405,
348 PgGetSerialSequence = 2406,
349 PgIndexColumnHasProperty = 2410,
350 HasTablePrivilege = 2407,
351 HasAnyColumnPrivilege = 2408,
352 HasSchemaPrivilege = 2409,
353 PgIsInRecovery = 2411,
354 RwRecoveryStatus = 2412,
355 RwEpochToTs = 2413,
356 PgTableIsVisible = 2414,
357 HasFunctionPrivilege = 2415,
358 HasDatabasePrivilege = 2416,
359 IcebergTransform = 2201,
361 OpenaiEmbedding = 2501,
363 }
364 impl Type {
365 pub fn as_str_name(&self) -> &'static str {
370 match self {
371 Self::Unspecified => "UNSPECIFIED",
372 Self::Add => "ADD",
373 Self::Subtract => "SUBTRACT",
374 Self::Multiply => "MULTIPLY",
375 Self::Divide => "DIVIDE",
376 Self::Modulus => "MODULUS",
377 Self::Equal => "EQUAL",
378 Self::NotEqual => "NOT_EQUAL",
379 Self::LessThan => "LESS_THAN",
380 Self::LessThanOrEqual => "LESS_THAN_OR_EQUAL",
381 Self::GreaterThan => "GREATER_THAN",
382 Self::GreaterThanOrEqual => "GREATER_THAN_OR_EQUAL",
383 Self::Greatest => "GREATEST",
384 Self::Least => "LEAST",
385 Self::And => "AND",
386 Self::Or => "OR",
387 Self::Not => "NOT",
388 Self::In => "IN",
389 Self::Some => "SOME",
390 Self::All => "ALL",
391 Self::BitwiseAnd => "BITWISE_AND",
392 Self::BitwiseOr => "BITWISE_OR",
393 Self::BitwiseXor => "BITWISE_XOR",
394 Self::BitwiseNot => "BITWISE_NOT",
395 Self::BitwiseShiftLeft => "BITWISE_SHIFT_LEFT",
396 Self::BitwiseShiftRight => "BITWISE_SHIFT_RIGHT",
397 Self::Extract => "EXTRACT",
398 Self::DatePart => "DATE_PART",
399 Self::TumbleStart => "TUMBLE_START",
400 Self::MakeDate => "MAKE_DATE",
401 Self::MakeTime => "MAKE_TIME",
402 Self::MakeTimestamp => "MAKE_TIMESTAMP",
403 Self::DateBin => "DATE_BIN",
404 Self::SecToTimestamptz => "SEC_TO_TIMESTAMPTZ",
405 Self::AtTimeZone => "AT_TIME_ZONE",
406 Self::DateTrunc => "DATE_TRUNC",
407 Self::CharToTimestamptz => "CHAR_TO_TIMESTAMPTZ",
408 Self::CharToDate => "CHAR_TO_DATE",
409 Self::CastWithTimeZone => "CAST_WITH_TIME_ZONE",
410 Self::AddWithTimeZone => "ADD_WITH_TIME_ZONE",
411 Self::SubtractWithTimeZone => "SUBTRACT_WITH_TIME_ZONE",
412 Self::MakeTimestamptz => "MAKE_TIMESTAMPTZ",
413 Self::Cast => "CAST",
414 Self::Substr => "SUBSTR",
415 Self::Length => "LENGTH",
416 Self::Like => "LIKE",
417 Self::ILike => "I_LIKE",
418 Self::SimilarToEscape => "SIMILAR_TO_ESCAPE",
419 Self::Upper => "UPPER",
420 Self::Lower => "LOWER",
421 Self::Trim => "TRIM",
422 Self::Replace => "REPLACE",
423 Self::Position => "POSITION",
424 Self::Ltrim => "LTRIM",
425 Self::Rtrim => "RTRIM",
426 Self::Case => "CASE",
427 Self::ConstantLookup => "CONSTANT_LOOKUP",
428 Self::RoundDigit => "ROUND_DIGIT",
429 Self::Round => "ROUND",
430 Self::Ascii => "ASCII",
431 Self::Translate => "TRANSLATE",
432 Self::Coalesce => "COALESCE",
433 Self::ConcatWs => "CONCAT_WS",
434 Self::ConcatWsVariadic => "CONCAT_WS_VARIADIC",
435 Self::Abs => "ABS",
436 Self::SplitPart => "SPLIT_PART",
437 Self::Ceil => "CEIL",
438 Self::Floor => "FLOOR",
439 Self::ToChar => "TO_CHAR",
440 Self::Md5 => "MD5",
441 Self::CharLength => "CHAR_LENGTH",
442 Self::Repeat => "REPEAT",
443 Self::ConcatOp => "CONCAT_OP",
444 Self::ByteaConcatOp => "BYTEA_CONCAT_OP",
445 Self::Concat => "CONCAT",
446 Self::ConcatVariadic => "CONCAT_VARIADIC",
447 Self::BoolOut => "BOOL_OUT",
448 Self::OctetLength => "OCTET_LENGTH",
449 Self::BitLength => "BIT_LENGTH",
450 Self::Overlay => "OVERLAY",
451 Self::RegexpMatch => "REGEXP_MATCH",
452 Self::RegexpReplace => "REGEXP_REPLACE",
453 Self::RegexpCount => "REGEXP_COUNT",
454 Self::RegexpSplitToArray => "REGEXP_SPLIT_TO_ARRAY",
455 Self::RegexpEq => "REGEXP_EQ",
456 Self::Pow => "POW",
457 Self::Exp => "EXP",
458 Self::Chr => "CHR",
459 Self::StartsWith => "STARTS_WITH",
460 Self::Initcap => "INITCAP",
461 Self::Lpad => "LPAD",
462 Self::Rpad => "RPAD",
463 Self::Reverse => "REVERSE",
464 Self::Strpos => "STRPOS",
465 Self::ToAscii => "TO_ASCII",
466 Self::ToHex => "TO_HEX",
467 Self::QuoteIdent => "QUOTE_IDENT",
468 Self::Sin => "SIN",
469 Self::Cos => "COS",
470 Self::Tan => "TAN",
471 Self::Cot => "COT",
472 Self::Asin => "ASIN",
473 Self::Acos => "ACOS",
474 Self::Atan => "ATAN",
475 Self::Atan2 => "ATAN2",
476 Self::Sind => "SIND",
477 Self::Cosd => "COSD",
478 Self::Cotd => "COTD",
479 Self::Tand => "TAND",
480 Self::Asind => "ASIND",
481 Self::Sqrt => "SQRT",
482 Self::Degrees => "DEGREES",
483 Self::Radians => "RADIANS",
484 Self::Cosh => "COSH",
485 Self::Tanh => "TANH",
486 Self::Coth => "COTH",
487 Self::Asinh => "ASINH",
488 Self::Acosh => "ACOSH",
489 Self::Atanh => "ATANH",
490 Self::Sinh => "SINH",
491 Self::Acosd => "ACOSD",
492 Self::Atand => "ATAND",
493 Self::Atan2d => "ATAN2D",
494 Self::Trunc => "TRUNC",
495 Self::Ln => "LN",
496 Self::Log10 => "LOG10",
497 Self::Cbrt => "CBRT",
498 Self::Sign => "SIGN",
499 Self::Scale => "SCALE",
500 Self::MinScale => "MIN_SCALE",
501 Self::TrimScale => "TRIM_SCALE",
502 Self::IsTrue => "IS_TRUE",
503 Self::IsNotTrue => "IS_NOT_TRUE",
504 Self::IsFalse => "IS_FALSE",
505 Self::IsNotFalse => "IS_NOT_FALSE",
506 Self::IsNull => "IS_NULL",
507 Self::IsNotNull => "IS_NOT_NULL",
508 Self::IsDistinctFrom => "IS_DISTINCT_FROM",
509 Self::IsNotDistinctFrom => "IS_NOT_DISTINCT_FROM",
510 Self::Encode => "ENCODE",
511 Self::Decode => "DECODE",
512 Self::Sha1 => "SHA1",
513 Self::Sha224 => "SHA224",
514 Self::Sha256 => "SHA256",
515 Self::Sha384 => "SHA384",
516 Self::Sha512 => "SHA512",
517 Self::Left => "LEFT",
518 Self::Right => "RIGHT",
519 Self::Format => "FORMAT",
520 Self::FormatVariadic => "FORMAT_VARIADIC",
521 Self::PgwireSend => "PGWIRE_SEND",
522 Self::PgwireRecv => "PGWIRE_RECV",
523 Self::ConvertFrom => "CONVERT_FROM",
524 Self::ConvertTo => "CONVERT_TO",
525 Self::Decrypt => "DECRYPT",
526 Self::Encrypt => "ENCRYPT",
527 Self::InetAton => "INET_ATON",
528 Self::InetNtoa => "INET_NTOA",
529 Self::QuoteLiteral => "QUOTE_LITERAL",
530 Self::QuoteNullable => "QUOTE_NULLABLE",
531 Self::Hmac => "HMAC",
532 Self::SecureCompare => "SECURE_COMPARE",
533 Self::CheckNotNull => "CHECK_NOT_NULL",
534 Self::Neg => "NEG",
535 Self::Field => "FIELD",
536 Self::Array => "ARRAY",
537 Self::ArrayAccess => "ARRAY_ACCESS",
538 Self::Row => "ROW",
539 Self::ArrayToString => "ARRAY_TO_STRING",
540 Self::ArrayRangeAccess => "ARRAY_RANGE_ACCESS",
541 Self::ArrayCat => "ARRAY_CAT",
542 Self::ArrayAppend => "ARRAY_APPEND",
543 Self::ArrayPrepend => "ARRAY_PREPEND",
544 Self::FormatType => "FORMAT_TYPE",
545 Self::ArrayDistinct => "ARRAY_DISTINCT",
546 Self::ArrayLength => "ARRAY_LENGTH",
547 Self::Cardinality => "CARDINALITY",
548 Self::ArrayRemove => "ARRAY_REMOVE",
549 Self::ArrayPositions => "ARRAY_POSITIONS",
550 Self::TrimArray => "TRIM_ARRAY",
551 Self::StringToArray => "STRING_TO_ARRAY",
552 Self::ArrayPosition => "ARRAY_POSITION",
553 Self::ArrayReplace => "ARRAY_REPLACE",
554 Self::ArrayDims => "ARRAY_DIMS",
555 Self::ArrayTransform => "ARRAY_TRANSFORM",
556 Self::ArrayMin => "ARRAY_MIN",
557 Self::ArrayMax => "ARRAY_MAX",
558 Self::ArraySum => "ARRAY_SUM",
559 Self::ArraySort => "ARRAY_SORT",
560 Self::ArrayContains => "ARRAY_CONTAINS",
561 Self::ArrayContained => "ARRAY_CONTAINED",
562 Self::ArrayFlatten => "ARRAY_FLATTEN",
563 Self::HexToInt256 => "HEX_TO_INT256",
564 Self::JsonbAccess => "JSONB_ACCESS",
565 Self::JsonbAccessStr => "JSONB_ACCESS_STR",
566 Self::JsonbExtractPath => "JSONB_EXTRACT_PATH",
567 Self::JsonbExtractPathVariadic => "JSONB_EXTRACT_PATH_VARIADIC",
568 Self::JsonbExtractPathText => "JSONB_EXTRACT_PATH_TEXT",
569 Self::JsonbExtractPathTextVariadic => "JSONB_EXTRACT_PATH_TEXT_VARIADIC",
570 Self::JsonbTypeof => "JSONB_TYPEOF",
571 Self::JsonbArrayLength => "JSONB_ARRAY_LENGTH",
572 Self::IsJson => "IS_JSON",
573 Self::JsonbConcat => "JSONB_CONCAT",
574 Self::JsonbObject => "JSONB_OBJECT",
575 Self::JsonbPretty => "JSONB_PRETTY",
576 Self::JsonbContains => "JSONB_CONTAINS",
577 Self::JsonbContained => "JSONB_CONTAINED",
578 Self::JsonbExists => "JSONB_EXISTS",
579 Self::JsonbExistsAny => "JSONB_EXISTS_ANY",
580 Self::JsonbExistsAll => "JSONB_EXISTS_ALL",
581 Self::JsonbDeletePath => "JSONB_DELETE_PATH",
582 Self::JsonbStripNulls => "JSONB_STRIP_NULLS",
583 Self::ToJsonb => "TO_JSONB",
584 Self::JsonbBuildArray => "JSONB_BUILD_ARRAY",
585 Self::JsonbBuildArrayVariadic => "JSONB_BUILD_ARRAY_VARIADIC",
586 Self::JsonbBuildObject => "JSONB_BUILD_OBJECT",
587 Self::JsonbBuildObjectVariadic => "JSONB_BUILD_OBJECT_VARIADIC",
588 Self::JsonbPathExists => "JSONB_PATH_EXISTS",
589 Self::JsonbPathMatch => "JSONB_PATH_MATCH",
590 Self::JsonbPathQueryArray => "JSONB_PATH_QUERY_ARRAY",
591 Self::JsonbPathQueryFirst => "JSONB_PATH_QUERY_FIRST",
592 Self::JsonbPopulateRecord => "JSONB_POPULATE_RECORD",
593 Self::JsonbToRecord => "JSONB_TO_RECORD",
594 Self::JsonbSet => "JSONB_SET",
595 Self::JsonbPopulateMap => "JSONB_POPULATE_MAP",
596 Self::JsonbToArray => "JSONB_TO_ARRAY",
597 Self::MapFromEntries => "MAP_FROM_ENTRIES",
598 Self::MapAccess => "MAP_ACCESS",
599 Self::MapKeys => "MAP_KEYS",
600 Self::MapValues => "MAP_VALUES",
601 Self::MapEntries => "MAP_ENTRIES",
602 Self::MapFromKeyValues => "MAP_FROM_KEY_VALUES",
603 Self::MapLength => "MAP_LENGTH",
604 Self::MapContains => "MAP_CONTAINS",
605 Self::MapCat => "MAP_CAT",
606 Self::MapInsert => "MAP_INSERT",
607 Self::MapDelete => "MAP_DELETE",
608 Self::MapFilter => "MAP_FILTER",
609 Self::L2Distance => "L2_DISTANCE",
610 Self::CosineDistance => "COSINE_DISTANCE",
611 Self::L1Distance => "L1_DISTANCE",
612 Self::InnerProduct => "INNER_PRODUCT",
613 Self::VecConcat => "VEC_CONCAT",
614 Self::L2Norm => "L2_NORM",
615 Self::L2Normalize => "L2_NORMALIZE",
616 Self::CompositeCast => "COMPOSITE_CAST",
617 Self::Vnode => "VNODE",
618 Self::TestFeature => "TEST_FEATURE",
619 Self::VnodeUser => "VNODE_USER",
620 Self::License => "LICENSE",
621 Self::Proctime => "PROCTIME",
622 Self::PgSleep => "PG_SLEEP",
623 Self::PgSleepFor => "PG_SLEEP_FOR",
624 Self::PgSleepUntil => "PG_SLEEP_UNTIL",
625 Self::Random => "RANDOM",
626 Self::CastRegclass => "CAST_REGCLASS",
627 Self::PgGetIndexdef => "PG_GET_INDEXDEF",
628 Self::ColDescription => "COL_DESCRIPTION",
629 Self::PgGetViewdef => "PG_GET_VIEWDEF",
630 Self::PgGetUserbyid => "PG_GET_USERBYID",
631 Self::PgIndexesSize => "PG_INDEXES_SIZE",
632 Self::PgRelationSize => "PG_RELATION_SIZE",
633 Self::PgGetSerialSequence => "PG_GET_SERIAL_SEQUENCE",
634 Self::PgIndexColumnHasProperty => "PG_INDEX_COLUMN_HAS_PROPERTY",
635 Self::HasTablePrivilege => "HAS_TABLE_PRIVILEGE",
636 Self::HasAnyColumnPrivilege => "HAS_ANY_COLUMN_PRIVILEGE",
637 Self::HasSchemaPrivilege => "HAS_SCHEMA_PRIVILEGE",
638 Self::PgIsInRecovery => "PG_IS_IN_RECOVERY",
639 Self::RwRecoveryStatus => "RW_RECOVERY_STATUS",
640 Self::RwEpochToTs => "RW_EPOCH_TO_TS",
641 Self::PgTableIsVisible => "PG_TABLE_IS_VISIBLE",
642 Self::HasFunctionPrivilege => "HAS_FUNCTION_PRIVILEGE",
643 Self::HasDatabasePrivilege => "HAS_DATABASE_PRIVILEGE",
644 Self::IcebergTransform => "ICEBERG_TRANSFORM",
645 Self::OpenaiEmbedding => "OPENAI_EMBEDDING",
646 }
647 }
648 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
650 match value {
651 "UNSPECIFIED" => Some(Self::Unspecified),
652 "ADD" => Some(Self::Add),
653 "SUBTRACT" => Some(Self::Subtract),
654 "MULTIPLY" => Some(Self::Multiply),
655 "DIVIDE" => Some(Self::Divide),
656 "MODULUS" => Some(Self::Modulus),
657 "EQUAL" => Some(Self::Equal),
658 "NOT_EQUAL" => Some(Self::NotEqual),
659 "LESS_THAN" => Some(Self::LessThan),
660 "LESS_THAN_OR_EQUAL" => Some(Self::LessThanOrEqual),
661 "GREATER_THAN" => Some(Self::GreaterThan),
662 "GREATER_THAN_OR_EQUAL" => Some(Self::GreaterThanOrEqual),
663 "GREATEST" => Some(Self::Greatest),
664 "LEAST" => Some(Self::Least),
665 "AND" => Some(Self::And),
666 "OR" => Some(Self::Or),
667 "NOT" => Some(Self::Not),
668 "IN" => Some(Self::In),
669 "SOME" => Some(Self::Some),
670 "ALL" => Some(Self::All),
671 "BITWISE_AND" => Some(Self::BitwiseAnd),
672 "BITWISE_OR" => Some(Self::BitwiseOr),
673 "BITWISE_XOR" => Some(Self::BitwiseXor),
674 "BITWISE_NOT" => Some(Self::BitwiseNot),
675 "BITWISE_SHIFT_LEFT" => Some(Self::BitwiseShiftLeft),
676 "BITWISE_SHIFT_RIGHT" => Some(Self::BitwiseShiftRight),
677 "EXTRACT" => Some(Self::Extract),
678 "DATE_PART" => Some(Self::DatePart),
679 "TUMBLE_START" => Some(Self::TumbleStart),
680 "MAKE_DATE" => Some(Self::MakeDate),
681 "MAKE_TIME" => Some(Self::MakeTime),
682 "MAKE_TIMESTAMP" => Some(Self::MakeTimestamp),
683 "DATE_BIN" => Some(Self::DateBin),
684 "SEC_TO_TIMESTAMPTZ" => Some(Self::SecToTimestamptz),
685 "AT_TIME_ZONE" => Some(Self::AtTimeZone),
686 "DATE_TRUNC" => Some(Self::DateTrunc),
687 "CHAR_TO_TIMESTAMPTZ" => Some(Self::CharToTimestamptz),
688 "CHAR_TO_DATE" => Some(Self::CharToDate),
689 "CAST_WITH_TIME_ZONE" => Some(Self::CastWithTimeZone),
690 "ADD_WITH_TIME_ZONE" => Some(Self::AddWithTimeZone),
691 "SUBTRACT_WITH_TIME_ZONE" => Some(Self::SubtractWithTimeZone),
692 "MAKE_TIMESTAMPTZ" => Some(Self::MakeTimestamptz),
693 "CAST" => Some(Self::Cast),
694 "SUBSTR" => Some(Self::Substr),
695 "LENGTH" => Some(Self::Length),
696 "LIKE" => Some(Self::Like),
697 "I_LIKE" => Some(Self::ILike),
698 "SIMILAR_TO_ESCAPE" => Some(Self::SimilarToEscape),
699 "UPPER" => Some(Self::Upper),
700 "LOWER" => Some(Self::Lower),
701 "TRIM" => Some(Self::Trim),
702 "REPLACE" => Some(Self::Replace),
703 "POSITION" => Some(Self::Position),
704 "LTRIM" => Some(Self::Ltrim),
705 "RTRIM" => Some(Self::Rtrim),
706 "CASE" => Some(Self::Case),
707 "CONSTANT_LOOKUP" => Some(Self::ConstantLookup),
708 "ROUND_DIGIT" => Some(Self::RoundDigit),
709 "ROUND" => Some(Self::Round),
710 "ASCII" => Some(Self::Ascii),
711 "TRANSLATE" => Some(Self::Translate),
712 "COALESCE" => Some(Self::Coalesce),
713 "CONCAT_WS" => Some(Self::ConcatWs),
714 "CONCAT_WS_VARIADIC" => Some(Self::ConcatWsVariadic),
715 "ABS" => Some(Self::Abs),
716 "SPLIT_PART" => Some(Self::SplitPart),
717 "CEIL" => Some(Self::Ceil),
718 "FLOOR" => Some(Self::Floor),
719 "TO_CHAR" => Some(Self::ToChar),
720 "MD5" => Some(Self::Md5),
721 "CHAR_LENGTH" => Some(Self::CharLength),
722 "REPEAT" => Some(Self::Repeat),
723 "CONCAT_OP" => Some(Self::ConcatOp),
724 "BYTEA_CONCAT_OP" => Some(Self::ByteaConcatOp),
725 "CONCAT" => Some(Self::Concat),
726 "CONCAT_VARIADIC" => Some(Self::ConcatVariadic),
727 "BOOL_OUT" => Some(Self::BoolOut),
728 "OCTET_LENGTH" => Some(Self::OctetLength),
729 "BIT_LENGTH" => Some(Self::BitLength),
730 "OVERLAY" => Some(Self::Overlay),
731 "REGEXP_MATCH" => Some(Self::RegexpMatch),
732 "REGEXP_REPLACE" => Some(Self::RegexpReplace),
733 "REGEXP_COUNT" => Some(Self::RegexpCount),
734 "REGEXP_SPLIT_TO_ARRAY" => Some(Self::RegexpSplitToArray),
735 "REGEXP_EQ" => Some(Self::RegexpEq),
736 "POW" => Some(Self::Pow),
737 "EXP" => Some(Self::Exp),
738 "CHR" => Some(Self::Chr),
739 "STARTS_WITH" => Some(Self::StartsWith),
740 "INITCAP" => Some(Self::Initcap),
741 "LPAD" => Some(Self::Lpad),
742 "RPAD" => Some(Self::Rpad),
743 "REVERSE" => Some(Self::Reverse),
744 "STRPOS" => Some(Self::Strpos),
745 "TO_ASCII" => Some(Self::ToAscii),
746 "TO_HEX" => Some(Self::ToHex),
747 "QUOTE_IDENT" => Some(Self::QuoteIdent),
748 "SIN" => Some(Self::Sin),
749 "COS" => Some(Self::Cos),
750 "TAN" => Some(Self::Tan),
751 "COT" => Some(Self::Cot),
752 "ASIN" => Some(Self::Asin),
753 "ACOS" => Some(Self::Acos),
754 "ATAN" => Some(Self::Atan),
755 "ATAN2" => Some(Self::Atan2),
756 "SIND" => Some(Self::Sind),
757 "COSD" => Some(Self::Cosd),
758 "COTD" => Some(Self::Cotd),
759 "TAND" => Some(Self::Tand),
760 "ASIND" => Some(Self::Asind),
761 "SQRT" => Some(Self::Sqrt),
762 "DEGREES" => Some(Self::Degrees),
763 "RADIANS" => Some(Self::Radians),
764 "COSH" => Some(Self::Cosh),
765 "TANH" => Some(Self::Tanh),
766 "COTH" => Some(Self::Coth),
767 "ASINH" => Some(Self::Asinh),
768 "ACOSH" => Some(Self::Acosh),
769 "ATANH" => Some(Self::Atanh),
770 "SINH" => Some(Self::Sinh),
771 "ACOSD" => Some(Self::Acosd),
772 "ATAND" => Some(Self::Atand),
773 "ATAN2D" => Some(Self::Atan2d),
774 "TRUNC" => Some(Self::Trunc),
775 "LN" => Some(Self::Ln),
776 "LOG10" => Some(Self::Log10),
777 "CBRT" => Some(Self::Cbrt),
778 "SIGN" => Some(Self::Sign),
779 "SCALE" => Some(Self::Scale),
780 "MIN_SCALE" => Some(Self::MinScale),
781 "TRIM_SCALE" => Some(Self::TrimScale),
782 "IS_TRUE" => Some(Self::IsTrue),
783 "IS_NOT_TRUE" => Some(Self::IsNotTrue),
784 "IS_FALSE" => Some(Self::IsFalse),
785 "IS_NOT_FALSE" => Some(Self::IsNotFalse),
786 "IS_NULL" => Some(Self::IsNull),
787 "IS_NOT_NULL" => Some(Self::IsNotNull),
788 "IS_DISTINCT_FROM" => Some(Self::IsDistinctFrom),
789 "IS_NOT_DISTINCT_FROM" => Some(Self::IsNotDistinctFrom),
790 "ENCODE" => Some(Self::Encode),
791 "DECODE" => Some(Self::Decode),
792 "SHA1" => Some(Self::Sha1),
793 "SHA224" => Some(Self::Sha224),
794 "SHA256" => Some(Self::Sha256),
795 "SHA384" => Some(Self::Sha384),
796 "SHA512" => Some(Self::Sha512),
797 "LEFT" => Some(Self::Left),
798 "RIGHT" => Some(Self::Right),
799 "FORMAT" => Some(Self::Format),
800 "FORMAT_VARIADIC" => Some(Self::FormatVariadic),
801 "PGWIRE_SEND" => Some(Self::PgwireSend),
802 "PGWIRE_RECV" => Some(Self::PgwireRecv),
803 "CONVERT_FROM" => Some(Self::ConvertFrom),
804 "CONVERT_TO" => Some(Self::ConvertTo),
805 "DECRYPT" => Some(Self::Decrypt),
806 "ENCRYPT" => Some(Self::Encrypt),
807 "INET_ATON" => Some(Self::InetAton),
808 "INET_NTOA" => Some(Self::InetNtoa),
809 "QUOTE_LITERAL" => Some(Self::QuoteLiteral),
810 "QUOTE_NULLABLE" => Some(Self::QuoteNullable),
811 "HMAC" => Some(Self::Hmac),
812 "SECURE_COMPARE" => Some(Self::SecureCompare),
813 "CHECK_NOT_NULL" => Some(Self::CheckNotNull),
814 "NEG" => Some(Self::Neg),
815 "FIELD" => Some(Self::Field),
816 "ARRAY" => Some(Self::Array),
817 "ARRAY_ACCESS" => Some(Self::ArrayAccess),
818 "ROW" => Some(Self::Row),
819 "ARRAY_TO_STRING" => Some(Self::ArrayToString),
820 "ARRAY_RANGE_ACCESS" => Some(Self::ArrayRangeAccess),
821 "ARRAY_CAT" => Some(Self::ArrayCat),
822 "ARRAY_APPEND" => Some(Self::ArrayAppend),
823 "ARRAY_PREPEND" => Some(Self::ArrayPrepend),
824 "FORMAT_TYPE" => Some(Self::FormatType),
825 "ARRAY_DISTINCT" => Some(Self::ArrayDistinct),
826 "ARRAY_LENGTH" => Some(Self::ArrayLength),
827 "CARDINALITY" => Some(Self::Cardinality),
828 "ARRAY_REMOVE" => Some(Self::ArrayRemove),
829 "ARRAY_POSITIONS" => Some(Self::ArrayPositions),
830 "TRIM_ARRAY" => Some(Self::TrimArray),
831 "STRING_TO_ARRAY" => Some(Self::StringToArray),
832 "ARRAY_POSITION" => Some(Self::ArrayPosition),
833 "ARRAY_REPLACE" => Some(Self::ArrayReplace),
834 "ARRAY_DIMS" => Some(Self::ArrayDims),
835 "ARRAY_TRANSFORM" => Some(Self::ArrayTransform),
836 "ARRAY_MIN" => Some(Self::ArrayMin),
837 "ARRAY_MAX" => Some(Self::ArrayMax),
838 "ARRAY_SUM" => Some(Self::ArraySum),
839 "ARRAY_SORT" => Some(Self::ArraySort),
840 "ARRAY_CONTAINS" => Some(Self::ArrayContains),
841 "ARRAY_CONTAINED" => Some(Self::ArrayContained),
842 "ARRAY_FLATTEN" => Some(Self::ArrayFlatten),
843 "HEX_TO_INT256" => Some(Self::HexToInt256),
844 "JSONB_ACCESS" => Some(Self::JsonbAccess),
845 "JSONB_ACCESS_STR" => Some(Self::JsonbAccessStr),
846 "JSONB_EXTRACT_PATH" => Some(Self::JsonbExtractPath),
847 "JSONB_EXTRACT_PATH_VARIADIC" => Some(Self::JsonbExtractPathVariadic),
848 "JSONB_EXTRACT_PATH_TEXT" => Some(Self::JsonbExtractPathText),
849 "JSONB_EXTRACT_PATH_TEXT_VARIADIC" => {
850 Some(Self::JsonbExtractPathTextVariadic)
851 }
852 "JSONB_TYPEOF" => Some(Self::JsonbTypeof),
853 "JSONB_ARRAY_LENGTH" => Some(Self::JsonbArrayLength),
854 "IS_JSON" => Some(Self::IsJson),
855 "JSONB_CONCAT" => Some(Self::JsonbConcat),
856 "JSONB_OBJECT" => Some(Self::JsonbObject),
857 "JSONB_PRETTY" => Some(Self::JsonbPretty),
858 "JSONB_CONTAINS" => Some(Self::JsonbContains),
859 "JSONB_CONTAINED" => Some(Self::JsonbContained),
860 "JSONB_EXISTS" => Some(Self::JsonbExists),
861 "JSONB_EXISTS_ANY" => Some(Self::JsonbExistsAny),
862 "JSONB_EXISTS_ALL" => Some(Self::JsonbExistsAll),
863 "JSONB_DELETE_PATH" => Some(Self::JsonbDeletePath),
864 "JSONB_STRIP_NULLS" => Some(Self::JsonbStripNulls),
865 "TO_JSONB" => Some(Self::ToJsonb),
866 "JSONB_BUILD_ARRAY" => Some(Self::JsonbBuildArray),
867 "JSONB_BUILD_ARRAY_VARIADIC" => Some(Self::JsonbBuildArrayVariadic),
868 "JSONB_BUILD_OBJECT" => Some(Self::JsonbBuildObject),
869 "JSONB_BUILD_OBJECT_VARIADIC" => Some(Self::JsonbBuildObjectVariadic),
870 "JSONB_PATH_EXISTS" => Some(Self::JsonbPathExists),
871 "JSONB_PATH_MATCH" => Some(Self::JsonbPathMatch),
872 "JSONB_PATH_QUERY_ARRAY" => Some(Self::JsonbPathQueryArray),
873 "JSONB_PATH_QUERY_FIRST" => Some(Self::JsonbPathQueryFirst),
874 "JSONB_POPULATE_RECORD" => Some(Self::JsonbPopulateRecord),
875 "JSONB_TO_RECORD" => Some(Self::JsonbToRecord),
876 "JSONB_SET" => Some(Self::JsonbSet),
877 "JSONB_POPULATE_MAP" => Some(Self::JsonbPopulateMap),
878 "JSONB_TO_ARRAY" => Some(Self::JsonbToArray),
879 "MAP_FROM_ENTRIES" => Some(Self::MapFromEntries),
880 "MAP_ACCESS" => Some(Self::MapAccess),
881 "MAP_KEYS" => Some(Self::MapKeys),
882 "MAP_VALUES" => Some(Self::MapValues),
883 "MAP_ENTRIES" => Some(Self::MapEntries),
884 "MAP_FROM_KEY_VALUES" => Some(Self::MapFromKeyValues),
885 "MAP_LENGTH" => Some(Self::MapLength),
886 "MAP_CONTAINS" => Some(Self::MapContains),
887 "MAP_CAT" => Some(Self::MapCat),
888 "MAP_INSERT" => Some(Self::MapInsert),
889 "MAP_DELETE" => Some(Self::MapDelete),
890 "MAP_FILTER" => Some(Self::MapFilter),
891 "L2_DISTANCE" => Some(Self::L2Distance),
892 "COSINE_DISTANCE" => Some(Self::CosineDistance),
893 "L1_DISTANCE" => Some(Self::L1Distance),
894 "INNER_PRODUCT" => Some(Self::InnerProduct),
895 "VEC_CONCAT" => Some(Self::VecConcat),
896 "L2_NORM" => Some(Self::L2Norm),
897 "L2_NORMALIZE" => Some(Self::L2Normalize),
898 "COMPOSITE_CAST" => Some(Self::CompositeCast),
899 "VNODE" => Some(Self::Vnode),
900 "TEST_FEATURE" => Some(Self::TestFeature),
901 "VNODE_USER" => Some(Self::VnodeUser),
902 "LICENSE" => Some(Self::License),
903 "PROCTIME" => Some(Self::Proctime),
904 "PG_SLEEP" => Some(Self::PgSleep),
905 "PG_SLEEP_FOR" => Some(Self::PgSleepFor),
906 "PG_SLEEP_UNTIL" => Some(Self::PgSleepUntil),
907 "RANDOM" => Some(Self::Random),
908 "CAST_REGCLASS" => Some(Self::CastRegclass),
909 "PG_GET_INDEXDEF" => Some(Self::PgGetIndexdef),
910 "COL_DESCRIPTION" => Some(Self::ColDescription),
911 "PG_GET_VIEWDEF" => Some(Self::PgGetViewdef),
912 "PG_GET_USERBYID" => Some(Self::PgGetUserbyid),
913 "PG_INDEXES_SIZE" => Some(Self::PgIndexesSize),
914 "PG_RELATION_SIZE" => Some(Self::PgRelationSize),
915 "PG_GET_SERIAL_SEQUENCE" => Some(Self::PgGetSerialSequence),
916 "PG_INDEX_COLUMN_HAS_PROPERTY" => Some(Self::PgIndexColumnHasProperty),
917 "HAS_TABLE_PRIVILEGE" => Some(Self::HasTablePrivilege),
918 "HAS_ANY_COLUMN_PRIVILEGE" => Some(Self::HasAnyColumnPrivilege),
919 "HAS_SCHEMA_PRIVILEGE" => Some(Self::HasSchemaPrivilege),
920 "PG_IS_IN_RECOVERY" => Some(Self::PgIsInRecovery),
921 "RW_RECOVERY_STATUS" => Some(Self::RwRecoveryStatus),
922 "RW_EPOCH_TO_TS" => Some(Self::RwEpochToTs),
923 "PG_TABLE_IS_VISIBLE" => Some(Self::PgTableIsVisible),
924 "HAS_FUNCTION_PRIVILEGE" => Some(Self::HasFunctionPrivilege),
925 "HAS_DATABASE_PRIVILEGE" => Some(Self::HasDatabasePrivilege),
926 "ICEBERG_TRANSFORM" => Some(Self::IcebergTransform),
927 "OPENAI_EMBEDDING" => Some(Self::OpenaiEmbedding),
928 _ => None,
929 }
930 }
931 }
932 #[derive(prost_helpers::AnyPB)]
933 #[derive(::enum_as_inner::EnumAsInner)]
934 #[derive(Eq, Hash)]
935 #[derive(Clone, PartialEq, ::prost::Oneof)]
936 pub enum RexNode {
937 #[prost(uint32, tag = "4")]
938 InputRef(u32),
939 #[prost(message, tag = "5")]
940 Constant(super::super::data::Datum),
941 #[prost(message, tag = "6")]
942 FuncCall(super::FunctionCall),
943 #[prost(message, tag = "7")]
944 Udf(::prost::alloc::boxed::Box<super::UserDefinedFunction>),
945 #[prost(message, tag = "8")]
946 Now(NowRexNode),
947 }
948}
949#[derive(prost_helpers::AnyPB)]
950#[derive(Clone, PartialEq, ::prost::Message)]
951pub struct TableFunction {
952 #[prost(enumeration = "table_function::Type", tag = "1")]
953 pub function_type: i32,
954 #[prost(message, repeated, tag = "2")]
955 pub args: ::prost::alloc::vec::Vec<ExprNode>,
956 #[prost(message, optional, tag = "3")]
957 pub return_type: ::core::option::Option<super::data::DataType>,
958 #[prost(message, optional, tag = "4")]
960 pub udf: ::core::option::Option<UserDefinedFunctionMetadata>,
961}
962pub mod table_function {
964 #[derive(prost_helpers::AnyPB)]
965 #[derive(
966 Clone,
967 Copy,
968 Debug,
969 PartialEq,
970 Eq,
971 Hash,
972 PartialOrd,
973 Ord,
974 ::prost::Enumeration
975 )]
976 #[repr(i32)]
977 pub enum Type {
978 Unspecified = 0,
979 GenerateSeries = 1,
980 Unnest = 2,
981 RegexpMatches = 3,
982 Range = 4,
983 GenerateSubscripts = 5,
984 PgExpandarray = 6,
986 PgGetKeywords = 18,
987 JsonbArrayElements = 10,
989 JsonbArrayElementsText = 11,
990 JsonbEach = 12,
991 JsonbEachText = 13,
992 JsonbObjectKeys = 14,
993 JsonbPathQuery = 15,
994 JsonbPopulateRecordset = 16,
995 JsonbToRecordset = 17,
996 FileScan = 19,
998 PostgresQuery = 20,
1000 MysqlQuery = 21,
1002 InternalBackfillProgress = 30,
1004 InternalSourceBackfillProgress = 31,
1006 UserDefined = 100,
1008 }
1009 impl Type {
1010 pub fn as_str_name(&self) -> &'static str {
1015 match self {
1016 Self::Unspecified => "UNSPECIFIED",
1017 Self::GenerateSeries => "GENERATE_SERIES",
1018 Self::Unnest => "UNNEST",
1019 Self::RegexpMatches => "REGEXP_MATCHES",
1020 Self::Range => "RANGE",
1021 Self::GenerateSubscripts => "GENERATE_SUBSCRIPTS",
1022 Self::PgExpandarray => "_PG_EXPANDARRAY",
1023 Self::PgGetKeywords => "PG_GET_KEYWORDS",
1024 Self::JsonbArrayElements => "JSONB_ARRAY_ELEMENTS",
1025 Self::JsonbArrayElementsText => "JSONB_ARRAY_ELEMENTS_TEXT",
1026 Self::JsonbEach => "JSONB_EACH",
1027 Self::JsonbEachText => "JSONB_EACH_TEXT",
1028 Self::JsonbObjectKeys => "JSONB_OBJECT_KEYS",
1029 Self::JsonbPathQuery => "JSONB_PATH_QUERY",
1030 Self::JsonbPopulateRecordset => "JSONB_POPULATE_RECORDSET",
1031 Self::JsonbToRecordset => "JSONB_TO_RECORDSET",
1032 Self::FileScan => "FILE_SCAN",
1033 Self::PostgresQuery => "POSTGRES_QUERY",
1034 Self::MysqlQuery => "MYSQL_QUERY",
1035 Self::InternalBackfillProgress => "INTERNAL_BACKFILL_PROGRESS",
1036 Self::InternalSourceBackfillProgress => {
1037 "INTERNAL_SOURCE_BACKFILL_PROGRESS"
1038 }
1039 Self::UserDefined => "USER_DEFINED",
1040 }
1041 }
1042 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1044 match value {
1045 "UNSPECIFIED" => Some(Self::Unspecified),
1046 "GENERATE_SERIES" => Some(Self::GenerateSeries),
1047 "UNNEST" => Some(Self::Unnest),
1048 "REGEXP_MATCHES" => Some(Self::RegexpMatches),
1049 "RANGE" => Some(Self::Range),
1050 "GENERATE_SUBSCRIPTS" => Some(Self::GenerateSubscripts),
1051 "_PG_EXPANDARRAY" => Some(Self::PgExpandarray),
1052 "PG_GET_KEYWORDS" => Some(Self::PgGetKeywords),
1053 "JSONB_ARRAY_ELEMENTS" => Some(Self::JsonbArrayElements),
1054 "JSONB_ARRAY_ELEMENTS_TEXT" => Some(Self::JsonbArrayElementsText),
1055 "JSONB_EACH" => Some(Self::JsonbEach),
1056 "JSONB_EACH_TEXT" => Some(Self::JsonbEachText),
1057 "JSONB_OBJECT_KEYS" => Some(Self::JsonbObjectKeys),
1058 "JSONB_PATH_QUERY" => Some(Self::JsonbPathQuery),
1059 "JSONB_POPULATE_RECORDSET" => Some(Self::JsonbPopulateRecordset),
1060 "JSONB_TO_RECORDSET" => Some(Self::JsonbToRecordset),
1061 "FILE_SCAN" => Some(Self::FileScan),
1062 "POSTGRES_QUERY" => Some(Self::PostgresQuery),
1063 "MYSQL_QUERY" => Some(Self::MysqlQuery),
1064 "INTERNAL_BACKFILL_PROGRESS" => Some(Self::InternalBackfillProgress),
1065 "INTERNAL_SOURCE_BACKFILL_PROGRESS" => {
1066 Some(Self::InternalSourceBackfillProgress)
1067 }
1068 "USER_DEFINED" => Some(Self::UserDefined),
1069 _ => None,
1070 }
1071 }
1072 }
1073}
1074#[derive(prost_helpers::AnyPB)]
1076#[derive(Eq, Hash)]
1077#[derive(Clone, PartialEq, ::prost::Message)]
1078pub struct InputRef {
1079 #[prost(uint32, tag = "1")]
1080 pub index: u32,
1081 #[prost(message, optional, tag = "2")]
1082 pub r#type: ::core::option::Option<super::data::DataType>,
1083}
1084#[derive(prost_helpers::AnyPB)]
1085#[derive(Clone, PartialEq, ::prost::Message)]
1086pub struct Constant {
1087 #[prost(message, optional, tag = "1")]
1088 pub datum: ::core::option::Option<super::data::Datum>,
1089 #[prost(message, optional, tag = "2")]
1090 pub r#type: ::core::option::Option<super::data::DataType>,
1091}
1092#[derive(prost_helpers::AnyPB)]
1119#[derive(Clone, PartialEq, ::prost::Message)]
1120pub struct ProjectSetSelectItem {
1121 #[prost(oneof = "project_set_select_item::SelectItem", tags = "1, 2")]
1122 pub select_item: ::core::option::Option<project_set_select_item::SelectItem>,
1123}
1124pub mod project_set_select_item {
1126 #[derive(prost_helpers::AnyPB)]
1127 #[derive(Clone, PartialEq, ::prost::Oneof)]
1128 pub enum SelectItem {
1129 #[prost(message, tag = "1")]
1130 Expr(super::ExprNode),
1131 #[prost(message, tag = "2")]
1132 TableFunction(super::TableFunction),
1133 }
1134}
1135#[derive(prost_helpers::AnyPB)]
1136#[derive(Eq, Hash)]
1137#[derive(Clone, PartialEq, ::prost::Message)]
1138pub struct FunctionCall {
1139 #[prost(message, repeated, tag = "1")]
1140 pub children: ::prost::alloc::vec::Vec<ExprNode>,
1141}
1142#[derive(prost_helpers::AnyPB)]
1144#[derive(Clone, PartialEq, ::prost::Message)]
1145pub struct AggCall {
1146 #[prost(enumeration = "agg_call::Kind", tag = "1")]
1147 pub kind: i32,
1148 #[prost(message, repeated, tag = "2")]
1149 pub args: ::prost::alloc::vec::Vec<InputRef>,
1150 #[prost(message, optional, tag = "3")]
1151 pub return_type: ::core::option::Option<super::data::DataType>,
1152 #[prost(bool, tag = "4")]
1153 pub distinct: bool,
1154 #[prost(message, repeated, tag = "5")]
1155 pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
1156 #[prost(message, optional, tag = "6")]
1157 pub filter: ::core::option::Option<ExprNode>,
1158 #[prost(message, repeated, tag = "7")]
1159 pub direct_args: ::prost::alloc::vec::Vec<Constant>,
1160 #[prost(message, optional, tag = "8")]
1162 pub udf: ::core::option::Option<UserDefinedFunctionMetadata>,
1163 #[prost(message, optional, tag = "9")]
1165 pub scalar: ::core::option::Option<ExprNode>,
1166}
1167pub mod agg_call {
1169 #[derive(prost_helpers::AnyPB)]
1170 #[derive(
1171 Clone,
1172 Copy,
1173 Debug,
1174 PartialEq,
1175 Eq,
1176 Hash,
1177 PartialOrd,
1178 Ord,
1179 ::prost::Enumeration
1180 )]
1181 #[repr(i32)]
1182 pub enum Kind {
1183 Unspecified = 0,
1184 Sum = 1,
1185 Min = 2,
1186 Max = 3,
1187 Count = 4,
1188 Avg = 5,
1189 StringAgg = 6,
1190 ApproxCountDistinct = 7,
1191 ArrayAgg = 8,
1192 FirstValue = 9,
1193 Sum0 = 10,
1194 VarPop = 11,
1195 VarSamp = 12,
1196 StddevPop = 13,
1197 StddevSamp = 14,
1198 BitAnd = 15,
1199 BitOr = 16,
1200 BitXor = 17,
1201 BoolAnd = 18,
1202 BoolOr = 19,
1203 JsonbAgg = 20,
1204 JsonbObjectAgg = 21,
1205 PercentileCont = 22,
1206 PercentileDisc = 23,
1207 Mode = 24,
1208 LastValue = 25,
1209 Grouping = 26,
1210 InternalLastSeenValue = 27,
1211 ApproxPercentile = 28,
1212 ArgMin = 29,
1213 ArgMax = 30,
1214 UserDefined = 100,
1216 WrapScalar = 101,
1218 }
1219 impl Kind {
1220 pub fn as_str_name(&self) -> &'static str {
1225 match self {
1226 Self::Unspecified => "UNSPECIFIED",
1227 Self::Sum => "SUM",
1228 Self::Min => "MIN",
1229 Self::Max => "MAX",
1230 Self::Count => "COUNT",
1231 Self::Avg => "AVG",
1232 Self::StringAgg => "STRING_AGG",
1233 Self::ApproxCountDistinct => "APPROX_COUNT_DISTINCT",
1234 Self::ArrayAgg => "ARRAY_AGG",
1235 Self::FirstValue => "FIRST_VALUE",
1236 Self::Sum0 => "SUM0",
1237 Self::VarPop => "VAR_POP",
1238 Self::VarSamp => "VAR_SAMP",
1239 Self::StddevPop => "STDDEV_POP",
1240 Self::StddevSamp => "STDDEV_SAMP",
1241 Self::BitAnd => "BIT_AND",
1242 Self::BitOr => "BIT_OR",
1243 Self::BitXor => "BIT_XOR",
1244 Self::BoolAnd => "BOOL_AND",
1245 Self::BoolOr => "BOOL_OR",
1246 Self::JsonbAgg => "JSONB_AGG",
1247 Self::JsonbObjectAgg => "JSONB_OBJECT_AGG",
1248 Self::PercentileCont => "PERCENTILE_CONT",
1249 Self::PercentileDisc => "PERCENTILE_DISC",
1250 Self::Mode => "MODE",
1251 Self::LastValue => "LAST_VALUE",
1252 Self::Grouping => "GROUPING",
1253 Self::InternalLastSeenValue => "INTERNAL_LAST_SEEN_VALUE",
1254 Self::ApproxPercentile => "APPROX_PERCENTILE",
1255 Self::ArgMin => "ARG_MIN",
1256 Self::ArgMax => "ARG_MAX",
1257 Self::UserDefined => "USER_DEFINED",
1258 Self::WrapScalar => "WRAP_SCALAR",
1259 }
1260 }
1261 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1263 match value {
1264 "UNSPECIFIED" => Some(Self::Unspecified),
1265 "SUM" => Some(Self::Sum),
1266 "MIN" => Some(Self::Min),
1267 "MAX" => Some(Self::Max),
1268 "COUNT" => Some(Self::Count),
1269 "AVG" => Some(Self::Avg),
1270 "STRING_AGG" => Some(Self::StringAgg),
1271 "APPROX_COUNT_DISTINCT" => Some(Self::ApproxCountDistinct),
1272 "ARRAY_AGG" => Some(Self::ArrayAgg),
1273 "FIRST_VALUE" => Some(Self::FirstValue),
1274 "SUM0" => Some(Self::Sum0),
1275 "VAR_POP" => Some(Self::VarPop),
1276 "VAR_SAMP" => Some(Self::VarSamp),
1277 "STDDEV_POP" => Some(Self::StddevPop),
1278 "STDDEV_SAMP" => Some(Self::StddevSamp),
1279 "BIT_AND" => Some(Self::BitAnd),
1280 "BIT_OR" => Some(Self::BitOr),
1281 "BIT_XOR" => Some(Self::BitXor),
1282 "BOOL_AND" => Some(Self::BoolAnd),
1283 "BOOL_OR" => Some(Self::BoolOr),
1284 "JSONB_AGG" => Some(Self::JsonbAgg),
1285 "JSONB_OBJECT_AGG" => Some(Self::JsonbObjectAgg),
1286 "PERCENTILE_CONT" => Some(Self::PercentileCont),
1287 "PERCENTILE_DISC" => Some(Self::PercentileDisc),
1288 "MODE" => Some(Self::Mode),
1289 "LAST_VALUE" => Some(Self::LastValue),
1290 "GROUPING" => Some(Self::Grouping),
1291 "INTERNAL_LAST_SEEN_VALUE" => Some(Self::InternalLastSeenValue),
1292 "APPROX_PERCENTILE" => Some(Self::ApproxPercentile),
1293 "ARG_MIN" => Some(Self::ArgMin),
1294 "ARG_MAX" => Some(Self::ArgMax),
1295 "USER_DEFINED" => Some(Self::UserDefined),
1296 "WRAP_SCALAR" => Some(Self::WrapScalar),
1297 _ => None,
1298 }
1299 }
1300 }
1301}
1302#[derive(prost_helpers::AnyPB)]
1308#[derive(Clone, PartialEq, ::prost::Message)]
1309pub struct AggType {
1310 #[prost(enumeration = "agg_call::Kind", tag = "1")]
1311 pub kind: i32,
1312 #[prost(message, optional, tag = "8")]
1314 pub udf_meta: ::core::option::Option<UserDefinedFunctionMetadata>,
1315 #[prost(message, optional, tag = "9")]
1317 pub scalar_expr: ::core::option::Option<ExprNode>,
1318}
1319#[derive(prost_helpers::AnyPB)]
1320#[derive(Clone, PartialEq, ::prost::Message)]
1321pub struct WindowFrame {
1322 #[prost(enumeration = "window_frame::Type", tag = "1")]
1323 pub r#type: i32,
1324 #[deprecated]
1326 #[prost(message, optional, tag = "2")]
1327 pub start: ::core::option::Option<window_frame::Bound>,
1328 #[deprecated]
1330 #[prost(message, optional, tag = "3")]
1331 pub end: ::core::option::Option<window_frame::Bound>,
1332 #[prost(enumeration = "window_frame::Exclusion", tag = "4")]
1333 pub exclusion: i32,
1334 #[prost(oneof = "window_frame::Bounds", tags = "10, 15, 20")]
1335 pub bounds: ::core::option::Option<window_frame::Bounds>,
1336}
1337pub mod window_frame {
1339 #[derive(prost_helpers::AnyPB)]
1341 #[derive(Clone, PartialEq, ::prost::Message)]
1342 pub struct Bound {
1343 #[prost(enumeration = "BoundType", tag = "1")]
1344 pub r#type: i32,
1345 #[prost(oneof = "bound::Offset", tags = "2, 3")]
1346 pub offset: ::core::option::Option<bound::Offset>,
1347 }
1348 pub mod bound {
1350 #[derive(prost_helpers::AnyPB)]
1351 #[derive(Clone, PartialEq, ::prost::Oneof)]
1352 pub enum Offset {
1353 #[prost(uint64, tag = "2")]
1354 Integer(u64),
1355 #[prost(message, tag = "3")]
1356 Datum(super::super::super::data::Datum),
1357 }
1358 }
1359 #[derive(prost_helpers::AnyPB)]
1360 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1361 pub struct RowsFrameBounds {
1362 #[prost(message, optional, tag = "1")]
1363 pub start: ::core::option::Option<RowsFrameBound>,
1364 #[prost(message, optional, tag = "2")]
1365 pub end: ::core::option::Option<RowsFrameBound>,
1366 }
1367 #[derive(prost_helpers::AnyPB)]
1368 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1369 pub struct RowsFrameBound {
1370 #[prost(enumeration = "BoundType", tag = "1")]
1371 pub r#type: i32,
1372 #[prost(uint64, optional, tag = "3")]
1373 pub offset: ::core::option::Option<u64>,
1374 }
1375 #[derive(prost_helpers::AnyPB)]
1376 #[derive(Clone, PartialEq, ::prost::Message)]
1377 pub struct RangeFrameBounds {
1378 #[prost(message, optional, tag = "1")]
1379 pub start: ::core::option::Option<RangeFrameBound>,
1380 #[prost(message, optional, tag = "2")]
1381 pub end: ::core::option::Option<RangeFrameBound>,
1382 #[prost(message, optional, tag = "10")]
1383 pub order_data_type: ::core::option::Option<super::super::data::DataType>,
1384 #[prost(message, optional, tag = "15")]
1385 pub order_type: ::core::option::Option<super::super::common::OrderType>,
1386 #[prost(message, optional, tag = "20")]
1387 pub offset_data_type: ::core::option::Option<super::super::data::DataType>,
1388 }
1389 #[derive(prost_helpers::AnyPB)]
1390 #[derive(Clone, PartialEq, ::prost::Message)]
1391 pub struct RangeFrameBound {
1392 #[prost(enumeration = "BoundType", tag = "1")]
1393 pub r#type: i32,
1394 #[prost(message, optional, tag = "3")]
1395 pub offset: ::core::option::Option<super::super::data::Datum>,
1396 }
1397 #[derive(prost_helpers::AnyPB)]
1398 #[derive(Clone, PartialEq, ::prost::Message)]
1399 pub struct SessionFrameBounds {
1400 #[prost(message, optional, tag = "1")]
1401 pub gap: ::core::option::Option<super::super::data::Datum>,
1402 #[prost(message, optional, tag = "10")]
1403 pub order_data_type: ::core::option::Option<super::super::data::DataType>,
1404 #[prost(message, optional, tag = "15")]
1405 pub order_type: ::core::option::Option<super::super::common::OrderType>,
1406 #[prost(message, optional, tag = "20")]
1407 pub gap_data_type: ::core::option::Option<super::super::data::DataType>,
1408 }
1409 #[derive(prost_helpers::AnyPB)]
1410 #[derive(
1411 Clone,
1412 Copy,
1413 Debug,
1414 PartialEq,
1415 Eq,
1416 Hash,
1417 PartialOrd,
1418 Ord,
1419 ::prost::Enumeration
1420 )]
1421 #[repr(i32)]
1422 pub enum Type {
1423 Unspecified = 0,
1424 RowsLegacy = 2,
1426 Rows = 5,
1427 Range = 10,
1428 Session = 15,
1429 }
1430 impl Type {
1431 pub fn as_str_name(&self) -> &'static str {
1436 match self {
1437 Self::Unspecified => "TYPE_UNSPECIFIED",
1438 Self::RowsLegacy => "TYPE_ROWS_LEGACY",
1439 Self::Rows => "TYPE_ROWS",
1440 Self::Range => "TYPE_RANGE",
1441 Self::Session => "TYPE_SESSION",
1442 }
1443 }
1444 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1446 match value {
1447 "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1448 "TYPE_ROWS_LEGACY" => Some(Self::RowsLegacy),
1449 "TYPE_ROWS" => Some(Self::Rows),
1450 "TYPE_RANGE" => Some(Self::Range),
1451 "TYPE_SESSION" => Some(Self::Session),
1452 _ => None,
1453 }
1454 }
1455 }
1456 #[derive(prost_helpers::AnyPB)]
1457 #[derive(
1458 Clone,
1459 Copy,
1460 Debug,
1461 PartialEq,
1462 Eq,
1463 Hash,
1464 PartialOrd,
1465 Ord,
1466 ::prost::Enumeration
1467 )]
1468 #[repr(i32)]
1469 pub enum BoundType {
1470 Unspecified = 0,
1471 UnboundedPreceding = 1,
1472 Preceding = 2,
1473 CurrentRow = 3,
1474 Following = 4,
1475 UnboundedFollowing = 5,
1476 }
1477 impl BoundType {
1478 pub fn as_str_name(&self) -> &'static str {
1483 match self {
1484 Self::Unspecified => "BOUND_TYPE_UNSPECIFIED",
1485 Self::UnboundedPreceding => "BOUND_TYPE_UNBOUNDED_PRECEDING",
1486 Self::Preceding => "BOUND_TYPE_PRECEDING",
1487 Self::CurrentRow => "BOUND_TYPE_CURRENT_ROW",
1488 Self::Following => "BOUND_TYPE_FOLLOWING",
1489 Self::UnboundedFollowing => "BOUND_TYPE_UNBOUNDED_FOLLOWING",
1490 }
1491 }
1492 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1494 match value {
1495 "BOUND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1496 "BOUND_TYPE_UNBOUNDED_PRECEDING" => Some(Self::UnboundedPreceding),
1497 "BOUND_TYPE_PRECEDING" => Some(Self::Preceding),
1498 "BOUND_TYPE_CURRENT_ROW" => Some(Self::CurrentRow),
1499 "BOUND_TYPE_FOLLOWING" => Some(Self::Following),
1500 "BOUND_TYPE_UNBOUNDED_FOLLOWING" => Some(Self::UnboundedFollowing),
1501 _ => None,
1502 }
1503 }
1504 }
1505 #[derive(prost_helpers::AnyPB)]
1506 #[derive(
1507 Clone,
1508 Copy,
1509 Debug,
1510 PartialEq,
1511 Eq,
1512 Hash,
1513 PartialOrd,
1514 Ord,
1515 ::prost::Enumeration
1516 )]
1517 #[repr(i32)]
1518 pub enum Exclusion {
1519 Unspecified = 0,
1520 CurrentRow = 1,
1521 NoOthers = 4,
1524 }
1525 impl Exclusion {
1526 pub fn as_str_name(&self) -> &'static str {
1531 match self {
1532 Self::Unspecified => "EXCLUSION_UNSPECIFIED",
1533 Self::CurrentRow => "EXCLUSION_CURRENT_ROW",
1534 Self::NoOthers => "EXCLUSION_NO_OTHERS",
1535 }
1536 }
1537 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1539 match value {
1540 "EXCLUSION_UNSPECIFIED" => Some(Self::Unspecified),
1541 "EXCLUSION_CURRENT_ROW" => Some(Self::CurrentRow),
1542 "EXCLUSION_NO_OTHERS" => Some(Self::NoOthers),
1543 _ => None,
1544 }
1545 }
1546 }
1547 #[derive(prost_helpers::AnyPB)]
1548 #[derive(Clone, PartialEq, ::prost::Oneof)]
1549 pub enum Bounds {
1550 #[prost(message, tag = "10")]
1551 Rows(RowsFrameBounds),
1552 #[prost(message, tag = "15")]
1553 Range(RangeFrameBounds),
1554 #[prost(message, tag = "20")]
1555 Session(SessionFrameBounds),
1556 }
1557}
1558#[derive(prost_helpers::AnyPB)]
1559#[derive(Clone, PartialEq, ::prost::Message)]
1560pub struct WindowFunction {
1561 #[prost(message, repeated, tag = "3")]
1562 pub args: ::prost::alloc::vec::Vec<InputRef>,
1563 #[prost(message, optional, tag = "4")]
1564 pub return_type: ::core::option::Option<super::data::DataType>,
1565 #[prost(message, optional, tag = "5")]
1566 pub frame: ::core::option::Option<WindowFrame>,
1567 #[prost(bool, tag = "6")]
1568 pub ignore_nulls: bool,
1569 #[prost(oneof = "window_function::Type", tags = "1, 2, 103")]
1570 pub r#type: ::core::option::Option<window_function::Type>,
1571}
1572pub mod window_function {
1574 #[derive(prost_helpers::AnyPB)]
1575 #[derive(
1576 Clone,
1577 Copy,
1578 Debug,
1579 PartialEq,
1580 Eq,
1581 Hash,
1582 PartialOrd,
1583 Ord,
1584 ::prost::Enumeration
1585 )]
1586 #[repr(i32)]
1587 pub enum GeneralType {
1588 Unspecified = 0,
1589 RowNumber = 1,
1590 Rank = 2,
1591 DenseRank = 3,
1592 Lag = 7,
1596 Lead = 8,
1597 }
1598 impl GeneralType {
1599 pub fn as_str_name(&self) -> &'static str {
1604 match self {
1605 Self::Unspecified => "UNSPECIFIED",
1606 Self::RowNumber => "ROW_NUMBER",
1607 Self::Rank => "RANK",
1608 Self::DenseRank => "DENSE_RANK",
1609 Self::Lag => "LAG",
1610 Self::Lead => "LEAD",
1611 }
1612 }
1613 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1615 match value {
1616 "UNSPECIFIED" => Some(Self::Unspecified),
1617 "ROW_NUMBER" => Some(Self::RowNumber),
1618 "RANK" => Some(Self::Rank),
1619 "DENSE_RANK" => Some(Self::DenseRank),
1620 "LAG" => Some(Self::Lag),
1621 "LEAD" => Some(Self::Lead),
1622 _ => None,
1623 }
1624 }
1625 }
1626 #[derive(prost_helpers::AnyPB)]
1627 #[derive(Clone, PartialEq, ::prost::Oneof)]
1628 pub enum Type {
1629 #[prost(enumeration = "GeneralType", tag = "1")]
1630 General(i32),
1631 #[prost(enumeration = "super::agg_call::Kind", tag = "2")]
1633 Aggregate(i32),
1634 #[prost(message, tag = "103")]
1635 Aggregate2(super::AggType),
1636 }
1637}
1638#[derive(prost_helpers::AnyPB)]
1639#[derive(Eq, Hash)]
1640#[derive(Clone, PartialEq, ::prost::Message)]
1641pub struct UserDefinedFunction {
1642 #[prost(message, repeated, tag = "1")]
1643 pub children: ::prost::alloc::vec::Vec<ExprNode>,
1644 #[prost(string, tag = "2")]
1645 pub name: ::prost::alloc::string::String,
1646 #[prost(string, repeated, tag = "8")]
1647 pub arg_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1648 #[prost(message, repeated, tag = "3")]
1649 pub arg_types: ::prost::alloc::vec::Vec<super::data::DataType>,
1650 #[prost(string, tag = "4")]
1651 pub language: ::prost::alloc::string::String,
1652 #[prost(string, optional, tag = "5")]
1654 pub link: ::core::option::Option<::prost::alloc::string::String>,
1655 #[prost(string, optional, tag = "6")]
1657 pub identifier: ::core::option::Option<::prost::alloc::string::String>,
1658 #[prost(string, optional, tag = "7")]
1660 pub body: ::core::option::Option<::prost::alloc::string::String>,
1661 #[prost(bytes = "vec", optional, tag = "10")]
1663 pub compressed_binary: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
1664 #[prost(bool, tag = "9")]
1665 pub always_retry_on_network_error: bool,
1666 #[prost(string, optional, tag = "11")]
1668 pub runtime: ::core::option::Option<::prost::alloc::string::String>,
1669 #[prost(bool, optional, tag = "13")]
1671 pub is_async: ::core::option::Option<bool>,
1672 #[prost(bool, optional, tag = "14")]
1673 pub is_batched: ::core::option::Option<bool>,
1674 #[prost(enumeration = "UdfExprVersion", tag = "1000")]
1675 pub version: i32,
1676}
1677#[derive(prost_helpers::AnyPB)]
1679#[derive(Eq, Hash)]
1680#[derive(Clone, PartialEq, ::prost::Message)]
1681pub struct UserDefinedFunctionMetadata {
1682 #[prost(string, repeated, tag = "8")]
1683 pub arg_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1684 #[prost(message, repeated, tag = "3")]
1685 pub arg_types: ::prost::alloc::vec::Vec<super::data::DataType>,
1686 #[prost(message, optional, tag = "13")]
1687 pub return_type: ::core::option::Option<super::data::DataType>,
1688 #[prost(string, tag = "4")]
1689 pub language: ::prost::alloc::string::String,
1690 #[prost(string, optional, tag = "5")]
1691 pub link: ::core::option::Option<::prost::alloc::string::String>,
1692 #[prost(string, optional, tag = "6")]
1694 pub identifier: ::core::option::Option<::prost::alloc::string::String>,
1695 #[prost(string, optional, tag = "7")]
1696 pub body: ::core::option::Option<::prost::alloc::string::String>,
1697 #[prost(bytes = "vec", optional, tag = "10")]
1698 pub compressed_binary: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
1699 #[prost(string, optional, tag = "11")]
1700 pub runtime: ::core::option::Option<::prost::alloc::string::String>,
1701 #[prost(enumeration = "UdfExprVersion", tag = "1000")]
1702 pub version: i32,
1703}
1704#[derive(prost_helpers::AnyPB)]
1705#[derive(prost_helpers::Version)]
1706#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1707#[repr(i32)]
1708pub enum UdfExprVersion {
1709 Unspecified = 0,
1711 NameInRuntime = 1,
1713}
1714impl UdfExprVersion {
1715 pub fn as_str_name(&self) -> &'static str {
1720 match self {
1721 Self::Unspecified => "UDF_EXPR_VERSION_UNSPECIFIED",
1722 Self::NameInRuntime => "UDF_EXPR_VERSION_NAME_IN_RUNTIME",
1723 }
1724 }
1725 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1727 match value {
1728 "UDF_EXPR_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
1729 "UDF_EXPR_VERSION_NAME_IN_RUNTIME" => Some(Self::NameInRuntime),
1730 _ => None,
1731 }
1732 }
1733}