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