#[derive(prost_helpers::AnyPB)]
#[derive(Eq, Hash)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExprNode {
#[prost(enumeration = "expr_node::Type", tag = "1")]
pub function_type: i32,
#[prost(message, optional, tag = "3")]
pub return_type: ::core::option::Option<super::data::DataType>,
#[prost(oneof = "expr_node::RexNode", tags = "4, 5, 6, 7, 8")]
pub rex_node: ::core::option::Option<expr_node::RexNode>,
}
pub mod expr_node {
#[derive(prost_helpers::AnyPB)]
#[derive(Eq, Hash)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NowRexNode {}
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Add = 3,
Subtract = 4,
Multiply = 5,
Divide = 6,
Modulus = 7,
Equal = 8,
NotEqual = 9,
LessThan = 10,
LessThanOrEqual = 11,
GreaterThan = 12,
GreaterThanOrEqual = 13,
Greatest = 14,
Least = 15,
And = 21,
Or = 22,
Not = 23,
In = 24,
Some = 25,
All = 26,
BitwiseAnd = 31,
BitwiseOr = 32,
BitwiseXor = 33,
BitwiseNot = 34,
BitwiseShiftLeft = 35,
BitwiseShiftRight = 36,
Extract = 101,
DatePart = 102,
TumbleStart = 103,
MakeDate = 113,
MakeTime = 114,
MakeTimestamp = 115,
SecToTimestamptz = 104,
AtTimeZone = 105,
DateTrunc = 106,
CharToTimestamptz = 107,
CharToDate = 111,
CastWithTimeZone = 108,
AddWithTimeZone = 109,
SubtractWithTimeZone = 110,
MakeTimestamptz = 112,
Cast = 201,
Substr = 202,
Length = 203,
Like = 204,
ILike = 279,
SimilarToEscape = 284,
Upper = 205,
Lower = 206,
Trim = 207,
Replace = 208,
Position = 209,
Ltrim = 210,
Rtrim = 211,
Case = 212,
ConstantLookup = 624,
RoundDigit = 213,
Round = 214,
Ascii = 215,
Translate = 216,
Coalesce = 217,
ConcatWs = 218,
ConcatWsVariadic = 285,
Abs = 219,
SplitPart = 220,
Ceil = 221,
Floor = 222,
ToChar = 223,
Md5 = 224,
CharLength = 225,
Repeat = 226,
ConcatOp = 227,
Concat = 286,
ConcatVariadic = 287,
BoolOut = 228,
OctetLength = 229,
BitLength = 230,
Overlay = 231,
RegexpMatch = 232,
RegexpReplace = 280,
RegexpCount = 281,
RegexpSplitToArray = 282,
RegexpEq = 283,
Pow = 233,
Exp = 234,
Chr = 235,
StartsWith = 236,
Initcap = 237,
Lpad = 238,
Rpad = 239,
Reverse = 240,
Strpos = 241,
ToAscii = 242,
ToHex = 243,
QuoteIdent = 244,
Sin = 245,
Cos = 246,
Tan = 247,
Cot = 248,
Asin = 249,
Acos = 250,
Atan = 251,
Atan2 = 252,
Sind = 253,
Cosd = 254,
Cotd = 255,
Tand = 256,
Asind = 257,
Sqrt = 258,
Degrees = 259,
Radians = 260,
Cosh = 261,
Tanh = 262,
Coth = 263,
Asinh = 264,
Acosh = 265,
Atanh = 266,
Sinh = 267,
Acosd = 268,
Trunc = 271,
Ln = 272,
Log10 = 273,
Cbrt = 274,
Sign = 275,
Scale = 276,
MinScale = 277,
TrimScale = 278,
IsTrue = 301,
IsNotTrue = 302,
IsFalse = 303,
IsNotFalse = 304,
IsNull = 305,
IsNotNull = 306,
IsDistinctFrom = 307,
IsNotDistinctFrom = 308,
Encode = 310,
Decode = 311,
Sha1 = 312,
Sha224 = 313,
Sha256 = 314,
Sha384 = 315,
Sha512 = 316,
Left = 317,
Right = 318,
Format = 319,
FormatVariadic = 326,
PgwireSend = 320,
PgwireRecv = 321,
ConvertFrom = 322,
ConvertTo = 323,
Decrypt = 324,
Encrypt = 325,
InetAton = 328,
InetNtoa = 329,
QuoteLiteral = 330,
QuoteNullable = 331,
Neg = 401,
Field = 501,
Array = 521,
ArrayAccess = 522,
Row = 523,
ArrayToString = 524,
ArrayRangeAccess = 525,
ArrayCat = 531,
ArrayAppend = 532,
ArrayPrepend = 533,
FormatType = 534,
ArrayDistinct = 535,
ArrayLength = 536,
Cardinality = 537,
ArrayRemove = 538,
ArrayPositions = 539,
TrimArray = 540,
StringToArray = 541,
ArrayPosition = 542,
ArrayReplace = 543,
ArrayDims = 544,
ArrayTransform = 545,
ArrayMin = 546,
ArrayMax = 547,
ArraySum = 548,
ArraySort = 549,
ArrayContains = 550,
ArrayContained = 551,
HexToInt256 = 560,
JsonbAccess = 600,
JsonbAccessStr = 601,
JsonbExtractPath = 627,
JsonbExtractPathVariadic = 613,
JsonbExtractPathText = 628,
JsonbExtractPathTextVariadic = 614,
JsonbTypeof = 602,
JsonbArrayLength = 603,
IsJson = 604,
JsonbConcat = 605,
JsonbObject = 606,
JsonbPretty = 607,
JsonbContains = 608,
JsonbContained = 609,
JsonbExists = 610,
JsonbExistsAny = 611,
JsonbExistsAll = 612,
JsonbDeletePath = 615,
JsonbStripNulls = 616,
ToJsonb = 617,
JsonbBuildArray = 618,
JsonbBuildArrayVariadic = 625,
JsonbBuildObject = 619,
JsonbBuildObjectVariadic = 626,
JsonbPathExists = 620,
JsonbPathMatch = 621,
JsonbPathQueryArray = 622,
JsonbPathQueryFirst = 623,
JsonbPopulateRecord = 629,
JsonbToRecord = 630,
JsonbSet = 631,
JsonbPopulateMap = 632,
MapFromEntries = 700,
MapAccess = 701,
MapKeys = 702,
MapValues = 703,
MapEntries = 704,
MapFromKeyValues = 705,
MapLength = 706,
MapContains = 707,
MapCat = 708,
MapInsert = 709,
MapDelete = 710,
Vnode = 1101,
TestPaidTier = 1102,
VnodeUser = 1103,
Proctime = 2023,
PgSleep = 2024,
PgSleepFor = 2025,
PgSleepUntil = 2026,
CastRegclass = 2100,
PgGetIndexdef = 2400,
ColDescription = 2401,
PgGetViewdef = 2402,
PgGetUserbyid = 2403,
PgIndexesSize = 2404,
PgRelationSize = 2405,
PgGetSerialSequence = 2406,
PgIndexColumnHasProperty = 2410,
HasTablePrivilege = 2407,
HasAnyColumnPrivilege = 2408,
HasSchemaPrivilege = 2409,
PgIsInRecovery = 2411,
RwRecoveryStatus = 2412,
RwEpochToTs = 2413,
IcebergTransform = 2201,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "UNSPECIFIED",
Type::Add => "ADD",
Type::Subtract => "SUBTRACT",
Type::Multiply => "MULTIPLY",
Type::Divide => "DIVIDE",
Type::Modulus => "MODULUS",
Type::Equal => "EQUAL",
Type::NotEqual => "NOT_EQUAL",
Type::LessThan => "LESS_THAN",
Type::LessThanOrEqual => "LESS_THAN_OR_EQUAL",
Type::GreaterThan => "GREATER_THAN",
Type::GreaterThanOrEqual => "GREATER_THAN_OR_EQUAL",
Type::Greatest => "GREATEST",
Type::Least => "LEAST",
Type::And => "AND",
Type::Or => "OR",
Type::Not => "NOT",
Type::In => "IN",
Type::Some => "SOME",
Type::All => "ALL",
Type::BitwiseAnd => "BITWISE_AND",
Type::BitwiseOr => "BITWISE_OR",
Type::BitwiseXor => "BITWISE_XOR",
Type::BitwiseNot => "BITWISE_NOT",
Type::BitwiseShiftLeft => "BITWISE_SHIFT_LEFT",
Type::BitwiseShiftRight => "BITWISE_SHIFT_RIGHT",
Type::Extract => "EXTRACT",
Type::DatePart => "DATE_PART",
Type::TumbleStart => "TUMBLE_START",
Type::MakeDate => "MAKE_DATE",
Type::MakeTime => "MAKE_TIME",
Type::MakeTimestamp => "MAKE_TIMESTAMP",
Type::SecToTimestamptz => "SEC_TO_TIMESTAMPTZ",
Type::AtTimeZone => "AT_TIME_ZONE",
Type::DateTrunc => "DATE_TRUNC",
Type::CharToTimestamptz => "CHAR_TO_TIMESTAMPTZ",
Type::CharToDate => "CHAR_TO_DATE",
Type::CastWithTimeZone => "CAST_WITH_TIME_ZONE",
Type::AddWithTimeZone => "ADD_WITH_TIME_ZONE",
Type::SubtractWithTimeZone => "SUBTRACT_WITH_TIME_ZONE",
Type::MakeTimestamptz => "MAKE_TIMESTAMPTZ",
Type::Cast => "CAST",
Type::Substr => "SUBSTR",
Type::Length => "LENGTH",
Type::Like => "LIKE",
Type::ILike => "I_LIKE",
Type::SimilarToEscape => "SIMILAR_TO_ESCAPE",
Type::Upper => "UPPER",
Type::Lower => "LOWER",
Type::Trim => "TRIM",
Type::Replace => "REPLACE",
Type::Position => "POSITION",
Type::Ltrim => "LTRIM",
Type::Rtrim => "RTRIM",
Type::Case => "CASE",
Type::ConstantLookup => "CONSTANT_LOOKUP",
Type::RoundDigit => "ROUND_DIGIT",
Type::Round => "ROUND",
Type::Ascii => "ASCII",
Type::Translate => "TRANSLATE",
Type::Coalesce => "COALESCE",
Type::ConcatWs => "CONCAT_WS",
Type::ConcatWsVariadic => "CONCAT_WS_VARIADIC",
Type::Abs => "ABS",
Type::SplitPart => "SPLIT_PART",
Type::Ceil => "CEIL",
Type::Floor => "FLOOR",
Type::ToChar => "TO_CHAR",
Type::Md5 => "MD5",
Type::CharLength => "CHAR_LENGTH",
Type::Repeat => "REPEAT",
Type::ConcatOp => "CONCAT_OP",
Type::Concat => "CONCAT",
Type::ConcatVariadic => "CONCAT_VARIADIC",
Type::BoolOut => "BOOL_OUT",
Type::OctetLength => "OCTET_LENGTH",
Type::BitLength => "BIT_LENGTH",
Type::Overlay => "OVERLAY",
Type::RegexpMatch => "REGEXP_MATCH",
Type::RegexpReplace => "REGEXP_REPLACE",
Type::RegexpCount => "REGEXP_COUNT",
Type::RegexpSplitToArray => "REGEXP_SPLIT_TO_ARRAY",
Type::RegexpEq => "REGEXP_EQ",
Type::Pow => "POW",
Type::Exp => "EXP",
Type::Chr => "CHR",
Type::StartsWith => "STARTS_WITH",
Type::Initcap => "INITCAP",
Type::Lpad => "LPAD",
Type::Rpad => "RPAD",
Type::Reverse => "REVERSE",
Type::Strpos => "STRPOS",
Type::ToAscii => "TO_ASCII",
Type::ToHex => "TO_HEX",
Type::QuoteIdent => "QUOTE_IDENT",
Type::Sin => "SIN",
Type::Cos => "COS",
Type::Tan => "TAN",
Type::Cot => "COT",
Type::Asin => "ASIN",
Type::Acos => "ACOS",
Type::Atan => "ATAN",
Type::Atan2 => "ATAN2",
Type::Sind => "SIND",
Type::Cosd => "COSD",
Type::Cotd => "COTD",
Type::Tand => "TAND",
Type::Asind => "ASIND",
Type::Sqrt => "SQRT",
Type::Degrees => "DEGREES",
Type::Radians => "RADIANS",
Type::Cosh => "COSH",
Type::Tanh => "TANH",
Type::Coth => "COTH",
Type::Asinh => "ASINH",
Type::Acosh => "ACOSH",
Type::Atanh => "ATANH",
Type::Sinh => "SINH",
Type::Acosd => "ACOSD",
Type::Trunc => "TRUNC",
Type::Ln => "LN",
Type::Log10 => "LOG10",
Type::Cbrt => "CBRT",
Type::Sign => "SIGN",
Type::Scale => "SCALE",
Type::MinScale => "MIN_SCALE",
Type::TrimScale => "TRIM_SCALE",
Type::IsTrue => "IS_TRUE",
Type::IsNotTrue => "IS_NOT_TRUE",
Type::IsFalse => "IS_FALSE",
Type::IsNotFalse => "IS_NOT_FALSE",
Type::IsNull => "IS_NULL",
Type::IsNotNull => "IS_NOT_NULL",
Type::IsDistinctFrom => "IS_DISTINCT_FROM",
Type::IsNotDistinctFrom => "IS_NOT_DISTINCT_FROM",
Type::Encode => "ENCODE",
Type::Decode => "DECODE",
Type::Sha1 => "SHA1",
Type::Sha224 => "SHA224",
Type::Sha256 => "SHA256",
Type::Sha384 => "SHA384",
Type::Sha512 => "SHA512",
Type::Left => "LEFT",
Type::Right => "RIGHT",
Type::Format => "FORMAT",
Type::FormatVariadic => "FORMAT_VARIADIC",
Type::PgwireSend => "PGWIRE_SEND",
Type::PgwireRecv => "PGWIRE_RECV",
Type::ConvertFrom => "CONVERT_FROM",
Type::ConvertTo => "CONVERT_TO",
Type::Decrypt => "DECRYPT",
Type::Encrypt => "ENCRYPT",
Type::InetAton => "INET_ATON",
Type::InetNtoa => "INET_NTOA",
Type::QuoteLiteral => "QUOTE_LITERAL",
Type::QuoteNullable => "QUOTE_NULLABLE",
Type::Neg => "NEG",
Type::Field => "FIELD",
Type::Array => "ARRAY",
Type::ArrayAccess => "ARRAY_ACCESS",
Type::Row => "ROW",
Type::ArrayToString => "ARRAY_TO_STRING",
Type::ArrayRangeAccess => "ARRAY_RANGE_ACCESS",
Type::ArrayCat => "ARRAY_CAT",
Type::ArrayAppend => "ARRAY_APPEND",
Type::ArrayPrepend => "ARRAY_PREPEND",
Type::FormatType => "FORMAT_TYPE",
Type::ArrayDistinct => "ARRAY_DISTINCT",
Type::ArrayLength => "ARRAY_LENGTH",
Type::Cardinality => "CARDINALITY",
Type::ArrayRemove => "ARRAY_REMOVE",
Type::ArrayPositions => "ARRAY_POSITIONS",
Type::TrimArray => "TRIM_ARRAY",
Type::StringToArray => "STRING_TO_ARRAY",
Type::ArrayPosition => "ARRAY_POSITION",
Type::ArrayReplace => "ARRAY_REPLACE",
Type::ArrayDims => "ARRAY_DIMS",
Type::ArrayTransform => "ARRAY_TRANSFORM",
Type::ArrayMin => "ARRAY_MIN",
Type::ArrayMax => "ARRAY_MAX",
Type::ArraySum => "ARRAY_SUM",
Type::ArraySort => "ARRAY_SORT",
Type::ArrayContains => "ARRAY_CONTAINS",
Type::ArrayContained => "ARRAY_CONTAINED",
Type::HexToInt256 => "HEX_TO_INT256",
Type::JsonbAccess => "JSONB_ACCESS",
Type::JsonbAccessStr => "JSONB_ACCESS_STR",
Type::JsonbExtractPath => "JSONB_EXTRACT_PATH",
Type::JsonbExtractPathVariadic => "JSONB_EXTRACT_PATH_VARIADIC",
Type::JsonbExtractPathText => "JSONB_EXTRACT_PATH_TEXT",
Type::JsonbExtractPathTextVariadic => "JSONB_EXTRACT_PATH_TEXT_VARIADIC",
Type::JsonbTypeof => "JSONB_TYPEOF",
Type::JsonbArrayLength => "JSONB_ARRAY_LENGTH",
Type::IsJson => "IS_JSON",
Type::JsonbConcat => "JSONB_CONCAT",
Type::JsonbObject => "JSONB_OBJECT",
Type::JsonbPretty => "JSONB_PRETTY",
Type::JsonbContains => "JSONB_CONTAINS",
Type::JsonbContained => "JSONB_CONTAINED",
Type::JsonbExists => "JSONB_EXISTS",
Type::JsonbExistsAny => "JSONB_EXISTS_ANY",
Type::JsonbExistsAll => "JSONB_EXISTS_ALL",
Type::JsonbDeletePath => "JSONB_DELETE_PATH",
Type::JsonbStripNulls => "JSONB_STRIP_NULLS",
Type::ToJsonb => "TO_JSONB",
Type::JsonbBuildArray => "JSONB_BUILD_ARRAY",
Type::JsonbBuildArrayVariadic => "JSONB_BUILD_ARRAY_VARIADIC",
Type::JsonbBuildObject => "JSONB_BUILD_OBJECT",
Type::JsonbBuildObjectVariadic => "JSONB_BUILD_OBJECT_VARIADIC",
Type::JsonbPathExists => "JSONB_PATH_EXISTS",
Type::JsonbPathMatch => "JSONB_PATH_MATCH",
Type::JsonbPathQueryArray => "JSONB_PATH_QUERY_ARRAY",
Type::JsonbPathQueryFirst => "JSONB_PATH_QUERY_FIRST",
Type::JsonbPopulateRecord => "JSONB_POPULATE_RECORD",
Type::JsonbToRecord => "JSONB_TO_RECORD",
Type::JsonbSet => "JSONB_SET",
Type::JsonbPopulateMap => "JSONB_POPULATE_MAP",
Type::MapFromEntries => "MAP_FROM_ENTRIES",
Type::MapAccess => "MAP_ACCESS",
Type::MapKeys => "MAP_KEYS",
Type::MapValues => "MAP_VALUES",
Type::MapEntries => "MAP_ENTRIES",
Type::MapFromKeyValues => "MAP_FROM_KEY_VALUES",
Type::MapLength => "MAP_LENGTH",
Type::MapContains => "MAP_CONTAINS",
Type::MapCat => "MAP_CAT",
Type::MapInsert => "MAP_INSERT",
Type::MapDelete => "MAP_DELETE",
Type::Vnode => "VNODE",
Type::TestPaidTier => "TEST_PAID_TIER",
Type::VnodeUser => "VNODE_USER",
Type::Proctime => "PROCTIME",
Type::PgSleep => "PG_SLEEP",
Type::PgSleepFor => "PG_SLEEP_FOR",
Type::PgSleepUntil => "PG_SLEEP_UNTIL",
Type::CastRegclass => "CAST_REGCLASS",
Type::PgGetIndexdef => "PG_GET_INDEXDEF",
Type::ColDescription => "COL_DESCRIPTION",
Type::PgGetViewdef => "PG_GET_VIEWDEF",
Type::PgGetUserbyid => "PG_GET_USERBYID",
Type::PgIndexesSize => "PG_INDEXES_SIZE",
Type::PgRelationSize => "PG_RELATION_SIZE",
Type::PgGetSerialSequence => "PG_GET_SERIAL_SEQUENCE",
Type::PgIndexColumnHasProperty => "PG_INDEX_COLUMN_HAS_PROPERTY",
Type::HasTablePrivilege => "HAS_TABLE_PRIVILEGE",
Type::HasAnyColumnPrivilege => "HAS_ANY_COLUMN_PRIVILEGE",
Type::HasSchemaPrivilege => "HAS_SCHEMA_PRIVILEGE",
Type::PgIsInRecovery => "PG_IS_IN_RECOVERY",
Type::RwRecoveryStatus => "RW_RECOVERY_STATUS",
Type::RwEpochToTs => "RW_EPOCH_TO_TS",
Type::IcebergTransform => "ICEBERG_TRANSFORM",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"ADD" => Some(Self::Add),
"SUBTRACT" => Some(Self::Subtract),
"MULTIPLY" => Some(Self::Multiply),
"DIVIDE" => Some(Self::Divide),
"MODULUS" => Some(Self::Modulus),
"EQUAL" => Some(Self::Equal),
"NOT_EQUAL" => Some(Self::NotEqual),
"LESS_THAN" => Some(Self::LessThan),
"LESS_THAN_OR_EQUAL" => Some(Self::LessThanOrEqual),
"GREATER_THAN" => Some(Self::GreaterThan),
"GREATER_THAN_OR_EQUAL" => Some(Self::GreaterThanOrEqual),
"GREATEST" => Some(Self::Greatest),
"LEAST" => Some(Self::Least),
"AND" => Some(Self::And),
"OR" => Some(Self::Or),
"NOT" => Some(Self::Not),
"IN" => Some(Self::In),
"SOME" => Some(Self::Some),
"ALL" => Some(Self::All),
"BITWISE_AND" => Some(Self::BitwiseAnd),
"BITWISE_OR" => Some(Self::BitwiseOr),
"BITWISE_XOR" => Some(Self::BitwiseXor),
"BITWISE_NOT" => Some(Self::BitwiseNot),
"BITWISE_SHIFT_LEFT" => Some(Self::BitwiseShiftLeft),
"BITWISE_SHIFT_RIGHT" => Some(Self::BitwiseShiftRight),
"EXTRACT" => Some(Self::Extract),
"DATE_PART" => Some(Self::DatePart),
"TUMBLE_START" => Some(Self::TumbleStart),
"MAKE_DATE" => Some(Self::MakeDate),
"MAKE_TIME" => Some(Self::MakeTime),
"MAKE_TIMESTAMP" => Some(Self::MakeTimestamp),
"SEC_TO_TIMESTAMPTZ" => Some(Self::SecToTimestamptz),
"AT_TIME_ZONE" => Some(Self::AtTimeZone),
"DATE_TRUNC" => Some(Self::DateTrunc),
"CHAR_TO_TIMESTAMPTZ" => Some(Self::CharToTimestamptz),
"CHAR_TO_DATE" => Some(Self::CharToDate),
"CAST_WITH_TIME_ZONE" => Some(Self::CastWithTimeZone),
"ADD_WITH_TIME_ZONE" => Some(Self::AddWithTimeZone),
"SUBTRACT_WITH_TIME_ZONE" => Some(Self::SubtractWithTimeZone),
"MAKE_TIMESTAMPTZ" => Some(Self::MakeTimestamptz),
"CAST" => Some(Self::Cast),
"SUBSTR" => Some(Self::Substr),
"LENGTH" => Some(Self::Length),
"LIKE" => Some(Self::Like),
"I_LIKE" => Some(Self::ILike),
"SIMILAR_TO_ESCAPE" => Some(Self::SimilarToEscape),
"UPPER" => Some(Self::Upper),
"LOWER" => Some(Self::Lower),
"TRIM" => Some(Self::Trim),
"REPLACE" => Some(Self::Replace),
"POSITION" => Some(Self::Position),
"LTRIM" => Some(Self::Ltrim),
"RTRIM" => Some(Self::Rtrim),
"CASE" => Some(Self::Case),
"CONSTANT_LOOKUP" => Some(Self::ConstantLookup),
"ROUND_DIGIT" => Some(Self::RoundDigit),
"ROUND" => Some(Self::Round),
"ASCII" => Some(Self::Ascii),
"TRANSLATE" => Some(Self::Translate),
"COALESCE" => Some(Self::Coalesce),
"CONCAT_WS" => Some(Self::ConcatWs),
"CONCAT_WS_VARIADIC" => Some(Self::ConcatWsVariadic),
"ABS" => Some(Self::Abs),
"SPLIT_PART" => Some(Self::SplitPart),
"CEIL" => Some(Self::Ceil),
"FLOOR" => Some(Self::Floor),
"TO_CHAR" => Some(Self::ToChar),
"MD5" => Some(Self::Md5),
"CHAR_LENGTH" => Some(Self::CharLength),
"REPEAT" => Some(Self::Repeat),
"CONCAT_OP" => Some(Self::ConcatOp),
"CONCAT" => Some(Self::Concat),
"CONCAT_VARIADIC" => Some(Self::ConcatVariadic),
"BOOL_OUT" => Some(Self::BoolOut),
"OCTET_LENGTH" => Some(Self::OctetLength),
"BIT_LENGTH" => Some(Self::BitLength),
"OVERLAY" => Some(Self::Overlay),
"REGEXP_MATCH" => Some(Self::RegexpMatch),
"REGEXP_REPLACE" => Some(Self::RegexpReplace),
"REGEXP_COUNT" => Some(Self::RegexpCount),
"REGEXP_SPLIT_TO_ARRAY" => Some(Self::RegexpSplitToArray),
"REGEXP_EQ" => Some(Self::RegexpEq),
"POW" => Some(Self::Pow),
"EXP" => Some(Self::Exp),
"CHR" => Some(Self::Chr),
"STARTS_WITH" => Some(Self::StartsWith),
"INITCAP" => Some(Self::Initcap),
"LPAD" => Some(Self::Lpad),
"RPAD" => Some(Self::Rpad),
"REVERSE" => Some(Self::Reverse),
"STRPOS" => Some(Self::Strpos),
"TO_ASCII" => Some(Self::ToAscii),
"TO_HEX" => Some(Self::ToHex),
"QUOTE_IDENT" => Some(Self::QuoteIdent),
"SIN" => Some(Self::Sin),
"COS" => Some(Self::Cos),
"TAN" => Some(Self::Tan),
"COT" => Some(Self::Cot),
"ASIN" => Some(Self::Asin),
"ACOS" => Some(Self::Acos),
"ATAN" => Some(Self::Atan),
"ATAN2" => Some(Self::Atan2),
"SIND" => Some(Self::Sind),
"COSD" => Some(Self::Cosd),
"COTD" => Some(Self::Cotd),
"TAND" => Some(Self::Tand),
"ASIND" => Some(Self::Asind),
"SQRT" => Some(Self::Sqrt),
"DEGREES" => Some(Self::Degrees),
"RADIANS" => Some(Self::Radians),
"COSH" => Some(Self::Cosh),
"TANH" => Some(Self::Tanh),
"COTH" => Some(Self::Coth),
"ASINH" => Some(Self::Asinh),
"ACOSH" => Some(Self::Acosh),
"ATANH" => Some(Self::Atanh),
"SINH" => Some(Self::Sinh),
"ACOSD" => Some(Self::Acosd),
"TRUNC" => Some(Self::Trunc),
"LN" => Some(Self::Ln),
"LOG10" => Some(Self::Log10),
"CBRT" => Some(Self::Cbrt),
"SIGN" => Some(Self::Sign),
"SCALE" => Some(Self::Scale),
"MIN_SCALE" => Some(Self::MinScale),
"TRIM_SCALE" => Some(Self::TrimScale),
"IS_TRUE" => Some(Self::IsTrue),
"IS_NOT_TRUE" => Some(Self::IsNotTrue),
"IS_FALSE" => Some(Self::IsFalse),
"IS_NOT_FALSE" => Some(Self::IsNotFalse),
"IS_NULL" => Some(Self::IsNull),
"IS_NOT_NULL" => Some(Self::IsNotNull),
"IS_DISTINCT_FROM" => Some(Self::IsDistinctFrom),
"IS_NOT_DISTINCT_FROM" => Some(Self::IsNotDistinctFrom),
"ENCODE" => Some(Self::Encode),
"DECODE" => Some(Self::Decode),
"SHA1" => Some(Self::Sha1),
"SHA224" => Some(Self::Sha224),
"SHA256" => Some(Self::Sha256),
"SHA384" => Some(Self::Sha384),
"SHA512" => Some(Self::Sha512),
"LEFT" => Some(Self::Left),
"RIGHT" => Some(Self::Right),
"FORMAT" => Some(Self::Format),
"FORMAT_VARIADIC" => Some(Self::FormatVariadic),
"PGWIRE_SEND" => Some(Self::PgwireSend),
"PGWIRE_RECV" => Some(Self::PgwireRecv),
"CONVERT_FROM" => Some(Self::ConvertFrom),
"CONVERT_TO" => Some(Self::ConvertTo),
"DECRYPT" => Some(Self::Decrypt),
"ENCRYPT" => Some(Self::Encrypt),
"INET_ATON" => Some(Self::InetAton),
"INET_NTOA" => Some(Self::InetNtoa),
"QUOTE_LITERAL" => Some(Self::QuoteLiteral),
"QUOTE_NULLABLE" => Some(Self::QuoteNullable),
"NEG" => Some(Self::Neg),
"FIELD" => Some(Self::Field),
"ARRAY" => Some(Self::Array),
"ARRAY_ACCESS" => Some(Self::ArrayAccess),
"ROW" => Some(Self::Row),
"ARRAY_TO_STRING" => Some(Self::ArrayToString),
"ARRAY_RANGE_ACCESS" => Some(Self::ArrayRangeAccess),
"ARRAY_CAT" => Some(Self::ArrayCat),
"ARRAY_APPEND" => Some(Self::ArrayAppend),
"ARRAY_PREPEND" => Some(Self::ArrayPrepend),
"FORMAT_TYPE" => Some(Self::FormatType),
"ARRAY_DISTINCT" => Some(Self::ArrayDistinct),
"ARRAY_LENGTH" => Some(Self::ArrayLength),
"CARDINALITY" => Some(Self::Cardinality),
"ARRAY_REMOVE" => Some(Self::ArrayRemove),
"ARRAY_POSITIONS" => Some(Self::ArrayPositions),
"TRIM_ARRAY" => Some(Self::TrimArray),
"STRING_TO_ARRAY" => Some(Self::StringToArray),
"ARRAY_POSITION" => Some(Self::ArrayPosition),
"ARRAY_REPLACE" => Some(Self::ArrayReplace),
"ARRAY_DIMS" => Some(Self::ArrayDims),
"ARRAY_TRANSFORM" => Some(Self::ArrayTransform),
"ARRAY_MIN" => Some(Self::ArrayMin),
"ARRAY_MAX" => Some(Self::ArrayMax),
"ARRAY_SUM" => Some(Self::ArraySum),
"ARRAY_SORT" => Some(Self::ArraySort),
"ARRAY_CONTAINS" => Some(Self::ArrayContains),
"ARRAY_CONTAINED" => Some(Self::ArrayContained),
"HEX_TO_INT256" => Some(Self::HexToInt256),
"JSONB_ACCESS" => Some(Self::JsonbAccess),
"JSONB_ACCESS_STR" => Some(Self::JsonbAccessStr),
"JSONB_EXTRACT_PATH" => Some(Self::JsonbExtractPath),
"JSONB_EXTRACT_PATH_VARIADIC" => Some(Self::JsonbExtractPathVariadic),
"JSONB_EXTRACT_PATH_TEXT" => Some(Self::JsonbExtractPathText),
"JSONB_EXTRACT_PATH_TEXT_VARIADIC" => {
Some(Self::JsonbExtractPathTextVariadic)
}
"JSONB_TYPEOF" => Some(Self::JsonbTypeof),
"JSONB_ARRAY_LENGTH" => Some(Self::JsonbArrayLength),
"IS_JSON" => Some(Self::IsJson),
"JSONB_CONCAT" => Some(Self::JsonbConcat),
"JSONB_OBJECT" => Some(Self::JsonbObject),
"JSONB_PRETTY" => Some(Self::JsonbPretty),
"JSONB_CONTAINS" => Some(Self::JsonbContains),
"JSONB_CONTAINED" => Some(Self::JsonbContained),
"JSONB_EXISTS" => Some(Self::JsonbExists),
"JSONB_EXISTS_ANY" => Some(Self::JsonbExistsAny),
"JSONB_EXISTS_ALL" => Some(Self::JsonbExistsAll),
"JSONB_DELETE_PATH" => Some(Self::JsonbDeletePath),
"JSONB_STRIP_NULLS" => Some(Self::JsonbStripNulls),
"TO_JSONB" => Some(Self::ToJsonb),
"JSONB_BUILD_ARRAY" => Some(Self::JsonbBuildArray),
"JSONB_BUILD_ARRAY_VARIADIC" => Some(Self::JsonbBuildArrayVariadic),
"JSONB_BUILD_OBJECT" => Some(Self::JsonbBuildObject),
"JSONB_BUILD_OBJECT_VARIADIC" => Some(Self::JsonbBuildObjectVariadic),
"JSONB_PATH_EXISTS" => Some(Self::JsonbPathExists),
"JSONB_PATH_MATCH" => Some(Self::JsonbPathMatch),
"JSONB_PATH_QUERY_ARRAY" => Some(Self::JsonbPathQueryArray),
"JSONB_PATH_QUERY_FIRST" => Some(Self::JsonbPathQueryFirst),
"JSONB_POPULATE_RECORD" => Some(Self::JsonbPopulateRecord),
"JSONB_TO_RECORD" => Some(Self::JsonbToRecord),
"JSONB_SET" => Some(Self::JsonbSet),
"JSONB_POPULATE_MAP" => Some(Self::JsonbPopulateMap),
"MAP_FROM_ENTRIES" => Some(Self::MapFromEntries),
"MAP_ACCESS" => Some(Self::MapAccess),
"MAP_KEYS" => Some(Self::MapKeys),
"MAP_VALUES" => Some(Self::MapValues),
"MAP_ENTRIES" => Some(Self::MapEntries),
"MAP_FROM_KEY_VALUES" => Some(Self::MapFromKeyValues),
"MAP_LENGTH" => Some(Self::MapLength),
"MAP_CONTAINS" => Some(Self::MapContains),
"MAP_CAT" => Some(Self::MapCat),
"MAP_INSERT" => Some(Self::MapInsert),
"MAP_DELETE" => Some(Self::MapDelete),
"VNODE" => Some(Self::Vnode),
"TEST_PAID_TIER" => Some(Self::TestPaidTier),
"VNODE_USER" => Some(Self::VnodeUser),
"PROCTIME" => Some(Self::Proctime),
"PG_SLEEP" => Some(Self::PgSleep),
"PG_SLEEP_FOR" => Some(Self::PgSleepFor),
"PG_SLEEP_UNTIL" => Some(Self::PgSleepUntil),
"CAST_REGCLASS" => Some(Self::CastRegclass),
"PG_GET_INDEXDEF" => Some(Self::PgGetIndexdef),
"COL_DESCRIPTION" => Some(Self::ColDescription),
"PG_GET_VIEWDEF" => Some(Self::PgGetViewdef),
"PG_GET_USERBYID" => Some(Self::PgGetUserbyid),
"PG_INDEXES_SIZE" => Some(Self::PgIndexesSize),
"PG_RELATION_SIZE" => Some(Self::PgRelationSize),
"PG_GET_SERIAL_SEQUENCE" => Some(Self::PgGetSerialSequence),
"PG_INDEX_COLUMN_HAS_PROPERTY" => Some(Self::PgIndexColumnHasProperty),
"HAS_TABLE_PRIVILEGE" => Some(Self::HasTablePrivilege),
"HAS_ANY_COLUMN_PRIVILEGE" => Some(Self::HasAnyColumnPrivilege),
"HAS_SCHEMA_PRIVILEGE" => Some(Self::HasSchemaPrivilege),
"PG_IS_IN_RECOVERY" => Some(Self::PgIsInRecovery),
"RW_RECOVERY_STATUS" => Some(Self::RwRecoveryStatus),
"RW_EPOCH_TO_TS" => Some(Self::RwEpochToTs),
"ICEBERG_TRANSFORM" => Some(Self::IcebergTransform),
_ => None,
}
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(::enum_as_inner::EnumAsInner)]
#[derive(Eq, Hash)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum RexNode {
#[prost(uint32, tag = "4")]
InputRef(u32),
#[prost(message, tag = "5")]
Constant(super::super::data::Datum),
#[prost(message, tag = "6")]
FuncCall(super::FunctionCall),
#[prost(message, tag = "7")]
Udf(super::UserDefinedFunction),
#[prost(message, tag = "8")]
Now(NowRexNode),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableFunction {
#[prost(enumeration = "table_function::Type", tag = "1")]
pub function_type: i32,
#[prost(message, repeated, tag = "2")]
pub args: ::prost::alloc::vec::Vec<ExprNode>,
#[prost(message, optional, tag = "3")]
pub return_type: ::core::option::Option<super::data::DataType>,
#[prost(message, optional, tag = "4")]
pub udf: ::core::option::Option<UserDefinedFunctionMetadata>,
}
pub mod table_function {
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
GenerateSeries = 1,
Unnest = 2,
RegexpMatches = 3,
Range = 4,
GenerateSubscripts = 5,
PgExpandarray = 6,
PgGetKeywords = 18,
JsonbArrayElements = 10,
JsonbArrayElementsText = 11,
JsonbEach = 12,
JsonbEachText = 13,
JsonbObjectKeys = 14,
JsonbPathQuery = 15,
JsonbPopulateRecordset = 16,
JsonbToRecordset = 17,
FileScan = 19,
PostgresQuery = 20,
MysqlQuery = 21,
UserDefined = 100,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "UNSPECIFIED",
Type::GenerateSeries => "GENERATE_SERIES",
Type::Unnest => "UNNEST",
Type::RegexpMatches => "REGEXP_MATCHES",
Type::Range => "RANGE",
Type::GenerateSubscripts => "GENERATE_SUBSCRIPTS",
Type::PgExpandarray => "_PG_EXPANDARRAY",
Type::PgGetKeywords => "PG_GET_KEYWORDS",
Type::JsonbArrayElements => "JSONB_ARRAY_ELEMENTS",
Type::JsonbArrayElementsText => "JSONB_ARRAY_ELEMENTS_TEXT",
Type::JsonbEach => "JSONB_EACH",
Type::JsonbEachText => "JSONB_EACH_TEXT",
Type::JsonbObjectKeys => "JSONB_OBJECT_KEYS",
Type::JsonbPathQuery => "JSONB_PATH_QUERY",
Type::JsonbPopulateRecordset => "JSONB_POPULATE_RECORDSET",
Type::JsonbToRecordset => "JSONB_TO_RECORDSET",
Type::FileScan => "FILE_SCAN",
Type::PostgresQuery => "POSTGRES_QUERY",
Type::MysqlQuery => "MYSQL_QUERY",
Type::UserDefined => "USER_DEFINED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"GENERATE_SERIES" => Some(Self::GenerateSeries),
"UNNEST" => Some(Self::Unnest),
"REGEXP_MATCHES" => Some(Self::RegexpMatches),
"RANGE" => Some(Self::Range),
"GENERATE_SUBSCRIPTS" => Some(Self::GenerateSubscripts),
"_PG_EXPANDARRAY" => Some(Self::PgExpandarray),
"PG_GET_KEYWORDS" => Some(Self::PgGetKeywords),
"JSONB_ARRAY_ELEMENTS" => Some(Self::JsonbArrayElements),
"JSONB_ARRAY_ELEMENTS_TEXT" => Some(Self::JsonbArrayElementsText),
"JSONB_EACH" => Some(Self::JsonbEach),
"JSONB_EACH_TEXT" => Some(Self::JsonbEachText),
"JSONB_OBJECT_KEYS" => Some(Self::JsonbObjectKeys),
"JSONB_PATH_QUERY" => Some(Self::JsonbPathQuery),
"JSONB_POPULATE_RECORDSET" => Some(Self::JsonbPopulateRecordset),
"JSONB_TO_RECORDSET" => Some(Self::JsonbToRecordset),
"FILE_SCAN" => Some(Self::FileScan),
"POSTGRES_QUERY" => Some(Self::PostgresQuery),
"MYSQL_QUERY" => Some(Self::MysqlQuery),
"USER_DEFINED" => Some(Self::UserDefined),
_ => None,
}
}
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq, Hash)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InputRef {
#[prost(uint32, tag = "1")]
pub index: u32,
#[prost(message, optional, tag = "2")]
pub r#type: ::core::option::Option<super::data::DataType>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Constant {
#[prost(message, optional, tag = "1")]
pub datum: ::core::option::Option<super::data::Datum>,
#[prost(message, optional, tag = "2")]
pub r#type: ::core::option::Option<super::data::DataType>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProjectSetSelectItem {
#[prost(oneof = "project_set_select_item::SelectItem", tags = "1, 2")]
pub select_item: ::core::option::Option<project_set_select_item::SelectItem>,
}
pub mod project_set_select_item {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SelectItem {
#[prost(message, tag = "1")]
Expr(super::ExprNode),
#[prost(message, tag = "2")]
TableFunction(super::TableFunction),
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq, Hash)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionCall {
#[prost(message, repeated, tag = "1")]
pub children: ::prost::alloc::vec::Vec<ExprNode>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggCall {
#[prost(enumeration = "agg_call::Kind", tag = "1")]
pub kind: i32,
#[prost(message, repeated, tag = "2")]
pub args: ::prost::alloc::vec::Vec<InputRef>,
#[prost(message, optional, tag = "3")]
pub return_type: ::core::option::Option<super::data::DataType>,
#[prost(bool, tag = "4")]
pub distinct: bool,
#[prost(message, repeated, tag = "5")]
pub order_by: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
#[prost(message, optional, tag = "6")]
pub filter: ::core::option::Option<ExprNode>,
#[prost(message, repeated, tag = "7")]
pub direct_args: ::prost::alloc::vec::Vec<Constant>,
#[prost(message, optional, tag = "8")]
pub udf: ::core::option::Option<UserDefinedFunctionMetadata>,
#[prost(message, optional, tag = "9")]
pub scalar: ::core::option::Option<ExprNode>,
}
pub mod agg_call {
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Kind {
Unspecified = 0,
Sum = 1,
Min = 2,
Max = 3,
Count = 4,
Avg = 5,
StringAgg = 6,
ApproxCountDistinct = 7,
ArrayAgg = 8,
FirstValue = 9,
Sum0 = 10,
VarPop = 11,
VarSamp = 12,
StddevPop = 13,
StddevSamp = 14,
BitAnd = 15,
BitOr = 16,
BitXor = 17,
BoolAnd = 18,
BoolOr = 19,
JsonbAgg = 20,
JsonbObjectAgg = 21,
PercentileCont = 22,
PercentileDisc = 23,
Mode = 24,
LastValue = 25,
Grouping = 26,
InternalLastSeenValue = 27,
ApproxPercentile = 28,
UserDefined = 100,
WrapScalar = 101,
}
impl Kind {
pub fn as_str_name(&self) -> &'static str {
match self {
Kind::Unspecified => "UNSPECIFIED",
Kind::Sum => "SUM",
Kind::Min => "MIN",
Kind::Max => "MAX",
Kind::Count => "COUNT",
Kind::Avg => "AVG",
Kind::StringAgg => "STRING_AGG",
Kind::ApproxCountDistinct => "APPROX_COUNT_DISTINCT",
Kind::ArrayAgg => "ARRAY_AGG",
Kind::FirstValue => "FIRST_VALUE",
Kind::Sum0 => "SUM0",
Kind::VarPop => "VAR_POP",
Kind::VarSamp => "VAR_SAMP",
Kind::StddevPop => "STDDEV_POP",
Kind::StddevSamp => "STDDEV_SAMP",
Kind::BitAnd => "BIT_AND",
Kind::BitOr => "BIT_OR",
Kind::BitXor => "BIT_XOR",
Kind::BoolAnd => "BOOL_AND",
Kind::BoolOr => "BOOL_OR",
Kind::JsonbAgg => "JSONB_AGG",
Kind::JsonbObjectAgg => "JSONB_OBJECT_AGG",
Kind::PercentileCont => "PERCENTILE_CONT",
Kind::PercentileDisc => "PERCENTILE_DISC",
Kind::Mode => "MODE",
Kind::LastValue => "LAST_VALUE",
Kind::Grouping => "GROUPING",
Kind::InternalLastSeenValue => "INTERNAL_LAST_SEEN_VALUE",
Kind::ApproxPercentile => "APPROX_PERCENTILE",
Kind::UserDefined => "USER_DEFINED",
Kind::WrapScalar => "WRAP_SCALAR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"SUM" => Some(Self::Sum),
"MIN" => Some(Self::Min),
"MAX" => Some(Self::Max),
"COUNT" => Some(Self::Count),
"AVG" => Some(Self::Avg),
"STRING_AGG" => Some(Self::StringAgg),
"APPROX_COUNT_DISTINCT" => Some(Self::ApproxCountDistinct),
"ARRAY_AGG" => Some(Self::ArrayAgg),
"FIRST_VALUE" => Some(Self::FirstValue),
"SUM0" => Some(Self::Sum0),
"VAR_POP" => Some(Self::VarPop),
"VAR_SAMP" => Some(Self::VarSamp),
"STDDEV_POP" => Some(Self::StddevPop),
"STDDEV_SAMP" => Some(Self::StddevSamp),
"BIT_AND" => Some(Self::BitAnd),
"BIT_OR" => Some(Self::BitOr),
"BIT_XOR" => Some(Self::BitXor),
"BOOL_AND" => Some(Self::BoolAnd),
"BOOL_OR" => Some(Self::BoolOr),
"JSONB_AGG" => Some(Self::JsonbAgg),
"JSONB_OBJECT_AGG" => Some(Self::JsonbObjectAgg),
"PERCENTILE_CONT" => Some(Self::PercentileCont),
"PERCENTILE_DISC" => Some(Self::PercentileDisc),
"MODE" => Some(Self::Mode),
"LAST_VALUE" => Some(Self::LastValue),
"GROUPING" => Some(Self::Grouping),
"INTERNAL_LAST_SEEN_VALUE" => Some(Self::InternalLastSeenValue),
"APPROX_PERCENTILE" => Some(Self::ApproxPercentile),
"USER_DEFINED" => Some(Self::UserDefined),
"WRAP_SCALAR" => Some(Self::WrapScalar),
_ => None,
}
}
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggType {
#[prost(enumeration = "agg_call::Kind", tag = "1")]
pub kind: i32,
#[prost(message, optional, tag = "8")]
pub udf_meta: ::core::option::Option<UserDefinedFunctionMetadata>,
#[prost(message, optional, tag = "9")]
pub scalar_expr: ::core::option::Option<ExprNode>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WindowFrame {
#[prost(enumeration = "window_frame::Type", tag = "1")]
pub r#type: i32,
#[deprecated]
#[prost(message, optional, tag = "2")]
pub start: ::core::option::Option<window_frame::Bound>,
#[deprecated]
#[prost(message, optional, tag = "3")]
pub end: ::core::option::Option<window_frame::Bound>,
#[prost(enumeration = "window_frame::Exclusion", tag = "4")]
pub exclusion: i32,
#[prost(oneof = "window_frame::Bounds", tags = "10, 15, 20")]
pub bounds: ::core::option::Option<window_frame::Bounds>,
}
pub mod window_frame {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Bound {
#[prost(enumeration = "BoundType", tag = "1")]
pub r#type: i32,
#[prost(oneof = "bound::Offset", tags = "2, 3")]
pub offset: ::core::option::Option<bound::Offset>,
}
pub mod bound {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Offset {
#[prost(uint64, tag = "2")]
Integer(u64),
#[prost(message, tag = "3")]
Datum(super::super::super::data::Datum),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RowsFrameBounds {
#[prost(message, optional, tag = "1")]
pub start: ::core::option::Option<RowsFrameBound>,
#[prost(message, optional, tag = "2")]
pub end: ::core::option::Option<RowsFrameBound>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RowsFrameBound {
#[prost(enumeration = "BoundType", tag = "1")]
pub r#type: i32,
#[prost(uint64, optional, tag = "3")]
pub offset: ::core::option::Option<u64>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RangeFrameBounds {
#[prost(message, optional, tag = "1")]
pub start: ::core::option::Option<RangeFrameBound>,
#[prost(message, optional, tag = "2")]
pub end: ::core::option::Option<RangeFrameBound>,
#[prost(message, optional, tag = "10")]
pub order_data_type: ::core::option::Option<super::super::data::DataType>,
#[prost(message, optional, tag = "15")]
pub order_type: ::core::option::Option<super::super::common::OrderType>,
#[prost(message, optional, tag = "20")]
pub offset_data_type: ::core::option::Option<super::super::data::DataType>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RangeFrameBound {
#[prost(enumeration = "BoundType", tag = "1")]
pub r#type: i32,
#[prost(message, optional, tag = "3")]
pub offset: ::core::option::Option<super::super::data::Datum>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionFrameBounds {
#[prost(message, optional, tag = "1")]
pub gap: ::core::option::Option<super::super::data::Datum>,
#[prost(message, optional, tag = "10")]
pub order_data_type: ::core::option::Option<super::super::data::DataType>,
#[prost(message, optional, tag = "15")]
pub order_type: ::core::option::Option<super::super::common::OrderType>,
#[prost(message, optional, tag = "20")]
pub gap_data_type: ::core::option::Option<super::super::data::DataType>,
}
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
RowsLegacy = 2,
Rows = 5,
Range = 10,
Session = 15,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::RowsLegacy => "TYPE_ROWS_LEGACY",
Type::Rows => "TYPE_ROWS",
Type::Range => "TYPE_RANGE",
Type::Session => "TYPE_SESSION",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"TYPE_ROWS_LEGACY" => Some(Self::RowsLegacy),
"TYPE_ROWS" => Some(Self::Rows),
"TYPE_RANGE" => Some(Self::Range),
"TYPE_SESSION" => Some(Self::Session),
_ => None,
}
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum BoundType {
Unspecified = 0,
UnboundedPreceding = 1,
Preceding = 2,
CurrentRow = 3,
Following = 4,
UnboundedFollowing = 5,
}
impl BoundType {
pub fn as_str_name(&self) -> &'static str {
match self {
BoundType::Unspecified => "BOUND_TYPE_UNSPECIFIED",
BoundType::UnboundedPreceding => "BOUND_TYPE_UNBOUNDED_PRECEDING",
BoundType::Preceding => "BOUND_TYPE_PRECEDING",
BoundType::CurrentRow => "BOUND_TYPE_CURRENT_ROW",
BoundType::Following => "BOUND_TYPE_FOLLOWING",
BoundType::UnboundedFollowing => "BOUND_TYPE_UNBOUNDED_FOLLOWING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BOUND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"BOUND_TYPE_UNBOUNDED_PRECEDING" => Some(Self::UnboundedPreceding),
"BOUND_TYPE_PRECEDING" => Some(Self::Preceding),
"BOUND_TYPE_CURRENT_ROW" => Some(Self::CurrentRow),
"BOUND_TYPE_FOLLOWING" => Some(Self::Following),
"BOUND_TYPE_UNBOUNDED_FOLLOWING" => Some(Self::UnboundedFollowing),
_ => None,
}
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Exclusion {
Unspecified = 0,
CurrentRow = 1,
NoOthers = 4,
}
impl Exclusion {
pub fn as_str_name(&self) -> &'static str {
match self {
Exclusion::Unspecified => "EXCLUSION_UNSPECIFIED",
Exclusion::CurrentRow => "EXCLUSION_CURRENT_ROW",
Exclusion::NoOthers => "EXCLUSION_NO_OTHERS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EXCLUSION_UNSPECIFIED" => Some(Self::Unspecified),
"EXCLUSION_CURRENT_ROW" => Some(Self::CurrentRow),
"EXCLUSION_NO_OTHERS" => Some(Self::NoOthers),
_ => None,
}
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Bounds {
#[prost(message, tag = "10")]
Rows(RowsFrameBounds),
#[prost(message, tag = "15")]
Range(RangeFrameBounds),
#[prost(message, tag = "20")]
Session(SessionFrameBounds),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WindowFunction {
#[prost(message, repeated, tag = "3")]
pub args: ::prost::alloc::vec::Vec<InputRef>,
#[prost(message, optional, tag = "4")]
pub return_type: ::core::option::Option<super::data::DataType>,
#[prost(message, optional, tag = "5")]
pub frame: ::core::option::Option<WindowFrame>,
#[prost(oneof = "window_function::Type", tags = "1, 2, 103")]
pub r#type: ::core::option::Option<window_function::Type>,
}
pub mod window_function {
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum GeneralType {
Unspecified = 0,
RowNumber = 1,
Rank = 2,
DenseRank = 3,
Lag = 7,
Lead = 8,
}
impl GeneralType {
pub fn as_str_name(&self) -> &'static str {
match self {
GeneralType::Unspecified => "UNSPECIFIED",
GeneralType::RowNumber => "ROW_NUMBER",
GeneralType::Rank => "RANK",
GeneralType::DenseRank => "DENSE_RANK",
GeneralType::Lag => "LAG",
GeneralType::Lead => "LEAD",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"ROW_NUMBER" => Some(Self::RowNumber),
"RANK" => Some(Self::Rank),
"DENSE_RANK" => Some(Self::DenseRank),
"LAG" => Some(Self::Lag),
"LEAD" => Some(Self::Lead),
_ => None,
}
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
#[prost(enumeration = "GeneralType", tag = "1")]
General(i32),
#[prost(enumeration = "super::agg_call::Kind", tag = "2")]
Aggregate(i32),
#[prost(message, tag = "103")]
Aggregate2(super::AggType),
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq, Hash)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserDefinedFunction {
#[prost(message, repeated, tag = "1")]
pub children: ::prost::alloc::vec::Vec<ExprNode>,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "8")]
pub arg_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "3")]
pub arg_types: ::prost::alloc::vec::Vec<super::data::DataType>,
#[prost(string, tag = "4")]
pub language: ::prost::alloc::string::String,
#[prost(string, optional, tag = "5")]
pub link: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub identifier: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "7")]
pub body: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bytes = "vec", optional, tag = "10")]
pub compressed_binary: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
#[prost(bool, tag = "9")]
pub always_retry_on_network_error: bool,
#[prost(string, optional, tag = "11")]
pub runtime: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(prost_helpers::AnyPB)]
#[derive(Eq, Hash)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserDefinedFunctionMetadata {
#[prost(string, repeated, tag = "8")]
pub arg_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "3")]
pub arg_types: ::prost::alloc::vec::Vec<super::data::DataType>,
#[prost(message, optional, tag = "13")]
pub return_type: ::core::option::Option<super::data::DataType>,
#[prost(string, tag = "4")]
pub language: ::prost::alloc::string::String,
#[prost(string, optional, tag = "5")]
pub link: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub identifier: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "7")]
pub body: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bytes = "vec", optional, tag = "10")]
pub compressed_binary: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
#[prost(string, optional, tag = "11")]
pub runtime: ::core::option::Option<::prost::alloc::string::String>,
}