diff --git a/Cargo.lock b/Cargo.lock index 812ffc2e8..fc6baf533 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,12 +70,6 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" -[[package]] -name = "always_send" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b628c617100dc3b59649fd9092ca9105433b5289ad9b43a82a71e3b6e08d26d" - [[package]] name = "android-tzdata" version = "0.1.1" @@ -4960,7 +4954,6 @@ dependencies = [ name = "vortex-datafusion" version = "0.21.1" dependencies = [ - "always_send", "anyhow", "arrow-array", "arrow-schema", diff --git a/vortex-datafusion/Cargo.toml b/vortex-datafusion/Cargo.toml index e31d97bd9..7347474a1 100644 --- a/vortex-datafusion/Cargo.toml +++ b/vortex-datafusion/Cargo.toml @@ -18,7 +18,6 @@ name = "vortex_datafusion" path = "src/lib.rs" [dependencies] -always_send = "0.1.1" arrow-array = { workspace = true } arrow-schema = { workspace = true } async-trait = { workspace = true } diff --git a/vortex-layout/src/layouts/flat/mod.rs b/vortex-layout/src/layouts/flat/mod.rs index 6b340a0d9..c5fe7b365 100644 --- a/vortex-layout/src/layouts/flat/mod.rs +++ b/vortex-layout/src/layouts/flat/mod.rs @@ -1,7 +1,6 @@ mod eval_expr; -mod reader; -// mod stats; mod eval_stats; +mod reader; pub mod writer; use std::collections::BTreeSet; diff --git a/vortex-layout/src/layouts/flat/stats.rs b/vortex-layout/src/layouts/flat/stats.rs deleted file mode 100644 index 0ccedaafc..000000000 --- a/vortex-layout/src/layouts/flat/stats.rs +++ /dev/null @@ -1,31 +0,0 @@ -use vortex_array::stats::{ArrayStatistics, Stat, StatsSet}; -use vortex_error::VortexResult; - -use crate::operations::{Operation, Poll}; -use crate::ready; -use crate::scanner::EvalOp; -use crate::segments::SegmentReader; - -pub struct FlatStatsOp { - // The scan operation for the current flat array. - scan: EvalOp, - requested_stats: Vec, - result: Option>, -} - -impl Operation for FlatStatsOp { - type Output = Vec; - - fn poll(&mut self, segments: &dyn SegmentReader) -> VortexResult> { - // If we have already computed the stats, return them - if let Some(stats_set) = &self.result { - return Ok(Poll::Some(stats_set.clone())); - } - - // Otherwise, fetch scan the array and compute the stats. - let array = ready!(self.scan.poll(segments)); - let stats_sets = vec![array.statistics().compute_all(&self.requested_stats)?]; - self.result = Some(stats_sets.clone()); - Ok(Poll::Some(stats_sets)) - } -}