-
Notifications
You must be signed in to change notification settings - Fork 135
Expand file tree
/
Copy pathvortex.expr.rs
More file actions
153 lines (153 loc) · 4.94 KB
/
vortex.expr.rs
File metadata and controls
153 lines (153 loc) · 4.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
// This file is @generated by prost-build.
/// Captures a generic representation of expressions in Vortex.
/// Expression deserializers can be registered with a Vortex session to handle parsing this into
/// an in-memory expression for execution.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Expr {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub children: ::prost::alloc::vec::Vec<Expr>,
#[prost(bytes = "vec", optional, tag = "3")]
pub metadata: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
/// Options for `vortex.literal`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LiteralOpts {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<super::scalar::Scalar>,
}
/// Options for `vortex.pack`
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PackOpts {
#[prost(string, repeated, tag = "1")]
pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "2")]
pub nullable: bool,
}
/// Options for `vortex.getitem`
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetItemOpts {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
}
/// Options for `vortex.binary`
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BinaryOpts {
#[prost(enumeration = "binary_opts::BinaryOp", tag = "1")]
pub op: i32,
}
/// Nested message and enum types in `BinaryOpts`.
pub mod binary_opts {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum BinaryOp {
Eq = 0,
NotEq = 1,
Gt = 2,
Gte = 3,
Lt = 4,
Lte = 5,
And = 6,
Or = 7,
Add = 8,
Sub = 9,
Mul = 10,
Div = 11,
KleeneAnd = 12,
KleeneOr = 13,
}
impl BinaryOp {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Eq => "Eq",
Self::NotEq => "NotEq",
Self::Gt => "Gt",
Self::Gte => "Gte",
Self::Lt => "Lt",
Self::Lte => "Lte",
Self::And => "And",
Self::Or => "Or",
Self::Add => "Add",
Self::Sub => "Sub",
Self::Mul => "Mul",
Self::Div => "Div",
Self::KleeneAnd => "KleeneAnd",
Self::KleeneOr => "KleeneOr",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Eq" => Some(Self::Eq),
"NotEq" => Some(Self::NotEq),
"Gt" => Some(Self::Gt),
"Gte" => Some(Self::Gte),
"Lt" => Some(Self::Lt),
"Lte" => Some(Self::Lte),
"And" => Some(Self::And),
"Or" => Some(Self::Or),
"Add" => Some(Self::Add),
"Sub" => Some(Self::Sub),
"Mul" => Some(Self::Mul),
"Div" => Some(Self::Div),
"KleeneAnd" => Some(Self::KleeneAnd),
"KleeneOr" => Some(Self::KleeneOr),
_ => None,
}
}
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BetweenOpts {
#[prost(bool, tag = "1")]
pub lower_strict: bool,
#[prost(bool, tag = "2")]
pub upper_strict: bool,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LikeOpts {
#[prost(bool, tag = "1")]
pub negated: bool,
#[prost(bool, tag = "2")]
pub case_insensitive: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CastOpts {
#[prost(message, optional, tag = "1")]
pub target: ::core::option::Option<super::dtype::DType>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FieldNames {
#[prost(string, repeated, tag = "1")]
pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SelectOpts {
#[prost(oneof = "select_opts::Opts", tags = "1, 2")]
pub opts: ::core::option::Option<select_opts::Opts>,
}
/// Nested message and enum types in `SelectOpts`.
pub mod select_opts {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Opts {
#[prost(message, tag = "1")]
Include(super::FieldNames),
#[prost(message, tag = "2")]
Exclude(super::FieldNames),
}
}