Skip to main content

vortex_array/proto/generated/
vortex.expr.rs

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