Skip to content

Commit 19a5bef

Browse files
committed
No expr for now
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 1e64162 commit 19a5bef

11 files changed

Lines changed: 0 additions & 720 deletions

File tree

vortex-array/public-api.lock

Lines changed: 0 additions & 452 deletions
Large diffs are not rendered by default.

vortex-array/src/arrays/variant/vtable/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

44
mod operations;
5-
mod rules;
65
mod validity;
76

87
use std::hash::Hasher;
@@ -12,7 +11,6 @@ use vortex_error::VortexResult;
1211
use vortex_error::vortex_ensure;
1312
use vortex_error::vortex_panic;
1413

15-
use self::rules::PARENT_RULES;
1614
use crate::ArrayEq;
1715
use crate::ArrayHash;
1816
use crate::ArrayRef;
@@ -156,12 +154,4 @@ impl VTable for Variant {
156154
// VariantArray is the canonical variant representation.
157155
Ok(ExecutionStep::done(array.clone().into_array()))
158156
}
159-
160-
fn reduce_parent(
161-
array: &Self::Array,
162-
parent: &ArrayRef,
163-
child_idx: usize,
164-
) -> VortexResult<Option<ArrayRef>> {
165-
PARENT_RULES.evaluate(array, parent, child_idx)
166-
}
167157
}

vortex-array/src/arrays/variant/vtable/rules.rs

Lines changed: 0 additions & 38 deletions
This file was deleted.

vortex-array/src/builtins.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ use crate::scalar_fn::fns::list_contains::ListContains;
3333
use crate::scalar_fn::fns::mask::Mask;
3434
use crate::scalar_fn::fns::not::Not;
3535
use crate::scalar_fn::fns::operators::Operator;
36-
use crate::scalar_fn::fns::variant_get::VariantGet;
37-
use crate::scalar_fn::fns::variant_get::VariantGetOptions;
38-
use crate::scalar_fn::fns::variant_get::VariantPath;
3936
use crate::scalar_fn::fns::zip::Zip;
4037

4138
/// A collection of built-in scalar functions that can be applied to expressions or arrays.
@@ -66,9 +63,6 @@ pub trait ExprBuiltins: Sized {
6663
/// Conditional selection: `result[i] = if mask[i] then if_true[i] else if_false[i]`.
6764
fn zip(&self, if_true: Expression, if_false: Expression) -> VortexResult<Expression>;
6865

69-
/// Extract data by path and dtype from a variant expression.
70-
fn variant_get(&self, path: Option<VariantPath>, dtype: DType) -> VortexResult<Expression>;
71-
7266
/// Apply a binary operator to this expression and another.
7367
fn binary(&self, rhs: Expression, op: Operator) -> VortexResult<Expression>;
7468
}
@@ -106,10 +100,6 @@ impl ExprBuiltins for Expression {
106100
Zip.try_new_expr(EmptyOptions, [if_true, if_false, self.clone()])
107101
}
108102

109-
fn variant_get(&self, path: Option<VariantPath>, dtype: DType) -> VortexResult<Expression> {
110-
VariantGet.try_new_expr(VariantGetOptions::new(path, dtype), [self.clone()])
111-
}
112-
113103
fn binary(&self, rhs: Expression, op: Operator) -> VortexResult<Expression> {
114104
Binary.try_new_expr(op, [self.clone(), rhs])
115105
}
@@ -142,9 +132,6 @@ pub trait ArrayBuiltins: Sized {
142132
/// Check if a list contains a value.
143133
fn list_contains(&self, value: ArrayRef) -> VortexResult<ArrayRef>;
144134

145-
/// Extract data by path and dtype from a variant array.
146-
fn variant_get(&self, path: Option<VariantPath>, dtype: DType) -> VortexResult<ArrayRef>;
147-
148135
/// Apply a binary operator to this array and another.
149136
fn binary(&self, rhs: ArrayRef, op: Operator) -> VortexResult<ArrayRef>;
150137

@@ -215,16 +202,6 @@ impl ArrayBuiltins for ArrayRef {
215202
.optimize()
216203
}
217204

218-
fn variant_get(&self, path: Option<VariantPath>, dtype: DType) -> VortexResult<ArrayRef> {
219-
VariantGet
220-
.try_new_array(
221-
self.len(),
222-
VariantGetOptions::new(path, dtype),
223-
[self.clone()],
224-
)?
225-
.optimize()
226-
}
227-
228205
fn binary(&self, rhs: ArrayRef, op: Operator) -> VortexResult<ArrayRef> {
229206
Binary
230207
.try_new_array(self.len(), op, [self.clone(), rhs])?

vortex-array/src/expr/exprs.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ use crate::scalar_fn::fns::pack::PackOptions;
4545
use crate::scalar_fn::fns::root::Root;
4646
use crate::scalar_fn::fns::select::FieldSelection;
4747
use crate::scalar_fn::fns::select::Select;
48-
use crate::scalar_fn::fns::variant_get::VariantGet;
49-
use crate::scalar_fn::fns::variant_get::VariantGetOptions;
50-
use crate::scalar_fn::fns::variant_get::VariantPath;
5148
use crate::scalar_fn::fns::zip::Zip;
5249

5350
// ---- Root ----
@@ -666,13 +663,6 @@ pub fn dynamic(
666663
)
667664
}
668665

669-
// ---- VariantGet ----
670-
671-
/// Creates an expression that extracts data by path and dtype from a variant expression.
672-
pub fn variant_get(path: Option<VariantPath>, dtype: DType, child: Expression) -> Expression {
673-
VariantGet.new_expr(VariantGetOptions::new(path, dtype), vec![child])
674-
}
675-
676666
// ---- ListContains ----
677667

678668
/// Creates an expression that checks if a value is contained in a list.

vortex-array/src/scalar_fn/fns/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@ pub mod operators;
1919
pub mod pack;
2020
pub mod root;
2121
pub mod select;
22-
pub mod variant_get;
2322
pub mod zip;

vortex-array/src/scalar_fn/fns/variant_get.rs

Lines changed: 0 additions & 145 deletions
This file was deleted.

vortex-array/src/scalar_fn/session.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use crate::scalar_fn::fns::not::Not;
2323
use crate::scalar_fn::fns::pack::Pack;
2424
use crate::scalar_fn::fns::root::Root;
2525
use crate::scalar_fn::fns::select::Select;
26-
use crate::scalar_fn::fns::variant_get::VariantGet;
2726

2827
/// Registry of scalar function vtables.
2928
/// Registry of scalar function vtables.
@@ -68,7 +67,6 @@ impl Default for ScalarFnSession {
6867
this.register(Pack);
6968
this.register(Root);
7069
this.register(Select);
71-
this.register(VariantGet);
7270

7371
this
7472
}

vortex-proto/proto/expr.proto

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,3 @@ message SelectOpts {
8989
message CaseWhenOpts {
9090
uint32 num_children = 1;
9191
}
92-
93-
// Options for `vortex.variant_get`
94-
message VariantGetOpts {
95-
vortex.dtype.DType dtype = 1;
96-
}

vortex-proto/public-api.lock

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,34 +1152,6 @@ pub fn vortex_proto::expr::SelectOpts::clear(&mut self)
11521152

11531153
pub fn vortex_proto::expr::SelectOpts::encoded_len(&self) -> usize
11541154

1155-
pub struct vortex_proto::expr::VariantGetOpts
1156-
1157-
pub vortex_proto::expr::VariantGetOpts::dtype: core::option::Option<vortex_proto::dtype::DType>
1158-
1159-
impl core::clone::Clone for vortex_proto::expr::VariantGetOpts
1160-
1161-
pub fn vortex_proto::expr::VariantGetOpts::clone(&self) -> vortex_proto::expr::VariantGetOpts
1162-
1163-
impl core::cmp::PartialEq for vortex_proto::expr::VariantGetOpts
1164-
1165-
pub fn vortex_proto::expr::VariantGetOpts::eq(&self, other: &vortex_proto::expr::VariantGetOpts) -> bool
1166-
1167-
impl core::default::Default for vortex_proto::expr::VariantGetOpts
1168-
1169-
pub fn vortex_proto::expr::VariantGetOpts::default() -> Self
1170-
1171-
impl core::fmt::Debug for vortex_proto::expr::VariantGetOpts
1172-
1173-
pub fn vortex_proto::expr::VariantGetOpts::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
1174-
1175-
impl core::marker::StructuralPartialEq for vortex_proto::expr::VariantGetOpts
1176-
1177-
impl prost::message::Message for vortex_proto::expr::VariantGetOpts
1178-
1179-
pub fn vortex_proto::expr::VariantGetOpts::clear(&mut self)
1180-
1181-
pub fn vortex_proto::expr::VariantGetOpts::encoded_len(&self) -> usize
1182-
11831155
pub mod vortex_proto::scalar
11841156

11851157
pub mod vortex_proto::scalar::scalar_value

0 commit comments

Comments
 (0)