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