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