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.binary`
43#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
44pub struct BinaryOpts {
45    #[prost(enumeration = "binary_opts::BinaryOp", tag = "1")]
46    pub op: i32,
47}
48/// Nested message and enum types in `BinaryOpts`.
49pub mod binary_opts {
50    #[derive(
51        Clone,
52        Copy,
53        Debug,
54        PartialEq,
55        Eq,
56        Hash,
57        PartialOrd,
58        Ord,
59        ::prost::Enumeration
60    )]
61    #[repr(i32)]
62    pub enum BinaryOp {
63        Eq = 0,
64        NotEq = 1,
65        Gt = 2,
66        Gte = 3,
67        Lt = 4,
68        Lte = 5,
69        And = 6,
70        Or = 7,
71        Add = 8,
72        Sub = 9,
73        Mul = 10,
74        Div = 11,
75    }
76    impl BinaryOp {
77        /// String value of the enum field names used in the ProtoBuf definition.
78        ///
79        /// The values are not transformed in any way and thus are considered stable
80        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
81        pub fn as_str_name(&self) -> &'static str {
82            match self {
83                Self::Eq => "Eq",
84                Self::NotEq => "NotEq",
85                Self::Gt => "Gt",
86                Self::Gte => "Gte",
87                Self::Lt => "Lt",
88                Self::Lte => "Lte",
89                Self::And => "And",
90                Self::Or => "Or",
91                Self::Add => "Add",
92                Self::Sub => "Sub",
93                Self::Mul => "Mul",
94                Self::Div => "Div",
95            }
96        }
97        /// Creates an enum from field names used in the ProtoBuf definition.
98        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
99            match value {
100                "Eq" => Some(Self::Eq),
101                "NotEq" => Some(Self::NotEq),
102                "Gt" => Some(Self::Gt),
103                "Gte" => Some(Self::Gte),
104                "Lt" => Some(Self::Lt),
105                "Lte" => Some(Self::Lte),
106                "And" => Some(Self::And),
107                "Or" => Some(Self::Or),
108                "Add" => Some(Self::Add),
109                "Sub" => Some(Self::Sub),
110                "Mul" => Some(Self::Mul),
111                "Div" => Some(Self::Div),
112                _ => None,
113            }
114        }
115    }
116}
117#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
118pub struct BetweenOpts {
119    #[prost(bool, tag = "1")]
120    pub lower_strict: bool,
121    #[prost(bool, tag = "2")]
122    pub upper_strict: bool,
123}
124#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
125pub struct LikeOpts {
126    #[prost(bool, tag = "1")]
127    pub negated: bool,
128    #[prost(bool, tag = "2")]
129    pub case_insensitive: bool,
130}
131#[derive(Clone, PartialEq, ::prost::Message)]
132pub struct CastOpts {
133    #[prost(message, optional, tag = "1")]
134    pub target: ::core::option::Option<super::dtype::DType>,
135}
136#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
137pub struct FieldNames {
138    #[prost(string, repeated, tag = "1")]
139    pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
140}
141#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
142pub struct SelectOpts {
143    #[prost(oneof = "select_opts::Opts", tags = "1, 2")]
144    pub opts: ::core::option::Option<select_opts::Opts>,
145}
146/// Nested message and enum types in `SelectOpts`.
147pub mod select_opts {
148    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
149    pub enum Opts {
150        #[prost(message, tag = "1")]
151        Include(super::FieldNames),
152        #[prost(message, tag = "2")]
153        Exclude(super::FieldNames),
154    }
155}
156/// Options for `vortex.case_when`
157/// Encodes num_when_then_pairs and has_else into a single u32 (num_children).
158/// num_children = num_when_then_pairs * 2 + (has_else ? 1 : 0)
159/// has_else = num_children % 2 == 1
160/// num_when_then_pairs = num_children / 2
161#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
162pub struct CaseWhenOpts {
163    #[prost(uint32, tag = "1")]
164    pub num_children: u32,
165}