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