-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
367 additions
and
43 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,14 +20,12 @@ resolver = "2" | |
version = "0.1.0" | ||
homepage = "https://github.com/fulcrum-so/vortex" | ||
repository = "https://github.com/fulcrum-so/vortex" | ||
authors = ["Robert Kruszewski <[email protected]>, Nicholas Gates <[email protected]>, Will Manning <[email protected]>"] | ||
authors = [ | ||
"Robert Kruszewski <[email protected]>, Nicholas Gates <[email protected]>, Will Manning <[email protected]>", | ||
] | ||
license = "Apache-2.0" | ||
keywords = ["vortex"] | ||
include = [ | ||
"benches/*.rs", | ||
"src/**/*.rs", | ||
"Cargo.toml", | ||
] | ||
include = ["benches/*.rs", "src/**/*.rs", "Cargo.toml"] | ||
edition = "2021" | ||
rust-version = "1.76" | ||
|
||
|
@@ -36,6 +34,7 @@ ahash = "0.8.11" | |
allocator-api2 = "0.2.16" | ||
arrayref = "0.3.7" | ||
arrow = { version = "52.0.0", features = ["pyarrow"] } | ||
arrow-arith = "52.0.0" | ||
arrow-array = "52.0.0" | ||
arrow-buffer = "52.0.0" | ||
arrow-cast = "52.0.0" | ||
|
@@ -96,6 +95,7 @@ pyo3-log = "0.11.0" | |
rand = "0.8.5" | ||
rayon = "1.10.0" | ||
reqwest = { version = "0.12.0", features = ["blocking"] } | ||
rstest = "0.21" | ||
seq-macro = "0.3.5" | ||
serde = "1.0.197" | ||
serde_json = "1.0.116" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
use arrow_arith::boolean; | ||
use arrow_array::cast::AsArray as _; | ||
use vortex_error::VortexResult; | ||
|
||
use crate::array::bool::BoolArray; | ||
use crate::arrow::FromArrowArray; | ||
use crate::compute::{AndFn, OrFn}; | ||
use crate::{Array, ArrayData, IntoArray, IntoCanonical}; | ||
|
||
impl OrFn for BoolArray { | ||
fn or(&self, array: &Array) -> VortexResult<Array> { | ||
let lhs = self.clone().into_canonical()?.into_arrow(); | ||
let lhs = lhs.as_boolean(); | ||
|
||
let rhs = array.clone().into_canonical()?.into_arrow(); | ||
let rhs = rhs.as_boolean(); | ||
|
||
let array = boolean::or(lhs, rhs)?; | ||
|
||
Ok(ArrayData::from_arrow(&array, true).into_array()) | ||
} | ||
} | ||
|
||
impl AndFn for BoolArray { | ||
fn and(&self, array: &Array) -> VortexResult<Array> { | ||
let lhs = self.clone().into_canonical()?.into_arrow(); | ||
let lhs = lhs.as_boolean(); | ||
|
||
let rhs = array.clone().into_canonical()?.into_arrow(); | ||
let rhs = rhs.as_boolean(); | ||
|
||
let array = boolean::and(lhs, rhs)?; | ||
|
||
Ok(ArrayData::from_arrow(&array, true).into_array()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.