Skip to main content

vortex_proto/generated/
vortex.expr.rs

1// This file is @generated by prost-build.
2/// Captures a generic representation of expressions in Vortex.
3/// Expression deserializers can be registered with a Vortex session to handle parsing this into
4/// an in-memory expression for execution.
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct Expr {
7    #[prost(string, tag = "1")]
8    pub id: ::prost::alloc::string::String,
9    #[prost(message, repeated, tag = "2")]
10    pub children: ::prost::alloc::vec::Vec<Expr>,
11    #[prost(bytes = "vec", optional, tag = "3")]
12    pub metadata: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
13}
14/// Captures a serialized aggregate function with its ID and options metadata.
15#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
16pub struct AggregateFn {
17    #[prost(string, tag = "1")]
18    pub id: ::prost::alloc::string::String,
19    #[prost(bytes = "vec", optional, tag = "2")]
20    pub metadata: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
21}
22/// Options for `vortex.literal`
23#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct LiteralOpts {
25    #[prost(message, optional, tag = "1")]
26    pub value: ::core::option::Option<super::scalar::Scalar>,
27}
28/// Options for `vortex.pack`
29#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
30pub struct PackOpts {
31    #[prost(string, repeated, tag = "1")]
32    pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
33    #[prost(bool, tag = "2")]
34    pub nullable: bool,
35}
36/// Options for `vortex.getitem`
37#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
38pub struct GetItemOpts {
39    #[prost(string, tag = "1")]
40    pub path: ::prost::alloc::string::String,
41}
42/// Options for `vortex.variant_get`
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct VariantGetOpts {
45    #[prost(message, repeated, tag = "1")]
46    pub path: ::prost::alloc::vec::Vec<VariantPathElement>,
47    #[prost(message, optional, tag = "2")]
48    pub dtype: ::core::option::Option<super::dtype::DType>,
49}
50#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
51pub struct VariantPathElement {
52    #[prost(oneof = "variant_path_element::Element", tags = "1, 2")]
53    pub element: ::core::option::Option<variant_path_element::Element>,
54}
55/// Nested message and enum types in `VariantPathElement`.
56pub mod variant_path_element {
57    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
58    pub enum Element {
59        #[prost(string, tag = "1")]
60        Field(::prost::alloc::string::String),
61        #[prost(uint64, tag = "2")]
62        Index(u64),
63    }
64}
65/// Options for `vortex.binary`
66#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
67pub struct BinaryOpts {
68    #[prost(enumeration = "binary_opts::BinaryOp", tag = "1")]
69    pub op: i32,
70}
71/// Nested message and enum types in `BinaryOpts`.
72pub mod binary_opts {
73    #[derive(
74        Clone,
75        Copy,
76        Debug,
77        PartialEq,
78        Eq,
79        Hash,
80        PartialOrd,
81        Ord,
82        ::prost::Enumeration
83    )]
84    #[repr(i32)]
85    pub enum BinaryOp {
86        Eq = 0,
87        NotEq = 1,
88        Gt = 2,
89        Gte = 3,
90        Lt = 4,
91        Lte = 5,
92        And = 6,
93        Or = 7,
94        Add = 8,
95        Sub = 9,
96        Mul = 10,
97        Div = 11,
98    }
99    impl BinaryOp {
100        /// String value of the enum field names used in the ProtoBuf definition.
101        ///
102        /// The values are not transformed in any way and thus are considered stable
103        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
104        pub fn as_str_name(&self) -> &'static str {
105            match self {
106                Self::Eq => "Eq",
107                Self::NotEq => "NotEq",
108                Self::Gt => "Gt",
109                Self::Gte => "Gte",
110                Self::Lt => "Lt",
111                Self::Lte => "Lte",
112                Self::And => "And",
113                Self::Or => "Or",
114                Self::Add => "Add",
115                Self::Sub => "Sub",
116                Self::Mul => "Mul",
117                Self::Div => "Div",
118            }
119        }
120        /// Creates an enum from field names used in the ProtoBuf definition.
121        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
122            match value {
123                "Eq" => Some(Self::Eq),
124                "NotEq" => Some(Self::NotEq),
125                "Gt" => Some(Self::Gt),
126                "Gte" => Some(Self::Gte),
127                "Lt" => Some(Self::Lt),
128                "Lte" => Some(Self::Lte),
129                "And" => Some(Self::And),
130                "Or" => Some(Self::Or),
131                "Add" => Some(Self::Add),
132                "Sub" => Some(Self::Sub),
133                "Mul" => Some(Self::Mul),
134                "Div" => Some(Self::Div),
135                _ => None,
136            }
137        }
138    }
139}
140#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
141pub struct BetweenOpts {
142    #[prost(bool, tag = "1")]
143    pub lower_strict: bool,
144    #[prost(bool, tag = "2")]
145    pub upper_strict: bool,
146}
147#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
148pub struct LikeOpts {
149    #[prost(bool, tag = "1")]
150    pub negated: bool,
151    #[prost(bool, tag = "2")]
152    pub case_insensitive: bool,
153}
154#[derive(Clone, PartialEq, ::prost::Message)]
155pub struct CastOpts {
156    #[prost(message, optional, tag = "1")]
157    pub target: ::core::option::Option<super::dtype::DType>,
158}
159#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
160pub struct FieldNames {
161    #[prost(string, repeated, tag = "1")]
162    pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
163}
164#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
165pub struct SelectOpts {
166    #[prost(oneof = "select_opts::Opts", tags = "1, 2")]
167    pub opts: ::core::option::Option<select_opts::Opts>,
168}
169/// Nested message and enum types in `SelectOpts`.
170pub mod select_opts {
171    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
172    pub enum Opts {
173        #[prost(message, tag = "1")]
174        Include(super::FieldNames),
175        #[prost(message, tag = "2")]
176        Exclude(super::FieldNames),
177    }
178}
179/// Options for `vortex.case_when`
180/// Encodes num_when_then_pairs and has_else into a single u32 (num_children).
181/// num_children = num_when_then_pairs * 2 + (has_else ? 1 : 0)
182/// has_else = num_children % 2 == 1
183/// num_when_then_pairs = num_children / 2
184#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
185pub struct CaseWhenOpts {
186    #[prost(uint32, tag = "1")]
187    pub num_children: u32,
188}