Skip to content

Commit a7a0514

Browse files
committed
style
1 parent 69e130d commit a7a0514

12 files changed

Lines changed: 7 additions & 132 deletions

File tree

vortex-bench/src/tpcds/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub mod tpcds_benchmark;
1111
pub use tpcds_benchmark::TpcDsBenchmark;
1212

1313
pub fn tpcds_queries() -> impl Iterator<Item = (usize, String)> {
14-
(1..=99).map(|idx| (idx, tpcds_query(idx)))
14+
(2..=2).map(|idx| (idx, tpcds_query(idx)))
1515
}
1616

1717
// A few tpcds queries have multiple statements, this handles that

vortex-datafusion/src/convert/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use vortex::error::VortexResult;
66
pub(crate) mod exprs;
77
mod scalars;
88
pub(crate) mod schema;
9-
pub(crate) mod stats;
109

1110
/// First-party trait for implementing conversion from DataFusion types to Vortex types.
1211
pub(crate) trait FromDataFusion<D: ?Sized>: Sized {

vortex-datafusion/src/convert/stats.rs

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

vortex-datafusion/src/v2/source.rs

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,8 @@ use datafusion_physical_plan::filter_pushdown::PushedDown;
3636
use datafusion_physical_plan::stream::RecordBatchStreamAdapter;
3737
use futures::StreamExt;
3838
use futures::TryStreamExt;
39-
use futures::future::try_join_all;
4039
use vortex::array::VortexSessionExecute;
4140
use vortex::array::arrow::ArrowArrayExecutor;
42-
use vortex::dtype::DType;
43-
use vortex::dtype::FieldPath;
4441
use vortex::dtype::Nullability;
4542
use vortex::error::VortexExpect;
4643
use vortex::error::VortexResult;
@@ -61,7 +58,6 @@ use crate::convert::exprs::DefaultExpressionConvertor;
6158
use crate::convert::exprs::ExpressionConvertor;
6259
use crate::convert::exprs::ProcessedProjection;
6360
use crate::convert::exprs::make_vortex_predicate;
64-
use crate::convert::stats::stats_set_to_df;
6561

6662
/// A builder for a [`VortexDataSource`].
6763
pub struct VortexDataSourceBuilder {
@@ -137,35 +133,14 @@ impl VortexDataSourceBuilder {
137133
));
138134
}
139135

140-
let DType::Struct(fields, ..) = projection.return_dtype(self.data_source.dtype())? else {
141-
vortex_bail!("Projection does not evaluate to a struct");
142-
};
143-
144-
// We now compute initial statistics.
145-
let field_paths: Vec<_> = fields
146-
.names()
147-
.iter()
148-
.cloned()
149-
.map(FieldPath::from_name)
150-
.collect();
151-
let statistics = try_join_all(
152-
field_paths
153-
.iter()
154-
.map(|path| self.data_source.field_statistics(path)),
155-
)
156-
.await?
157-
.iter()
158-
.zip(fields.fields())
159-
.map(|(stats, dtype)| stats_set_to_df(stats, &dtype))
160-
.collect::<VortexResult<Vec<_>>>()?;
161-
136+
let statistics = Vec::new();
162137
Ok(VortexDataSource {
163138
data_source: self.data_source,
164139
session: self.session,
165140
initial_schema: Arc::clone(&arrow_schema),
166141
initial_projection: projection.clone(),
167142
initial_statistics: statistics.clone(),
168-
projected_projection: projection.clone(),
143+
projected_projection: projection,
169144
projected_schema: Arc::clone(&arrow_schema),
170145
projected_statistics: statistics.clone(),
171146
leftover_projection: None,

vortex-duckdb/src/datasource.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl<T: DataSourceTableFunction> TableFunction for T {
205205
result.add_result_column(column_name, column_type);
206206
let stats_set = &file_stats.stats_sets()[i];
207207
let dtype = &file_stats.dtypes()[i];
208-
stats.push(ColumnStatistics::new(&stats_set, dtype.clone()));
208+
stats.push(ColumnStatistics::new(stats_set, dtype.clone()));
209209
}
210210

211211
Ok(DataSourceBindData {

vortex-duckdb/src/duckdb/table_function/statistics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub(crate) unsafe extern "C-unwind" fn statistics<T: TableFunction>(
2727
.cast::<T::BindData>()
2828
.as_ref()
2929
.vortex_expect("bind_data null pointer");
30-
let stats_ref = T::statistics(client_context, &bind_data, column_index);
30+
let stats_ref = T::statistics(client_context, bind_data, column_index);
3131
let dtype = stats_ref.minmax_dtype;
3232

3333
if let Some(value) = stats_ref.min {

vortex-file/src/footer/file_statistics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl FileStatistics {
156156
other.stats_sets().iter(),
157157
dtypes.iter()
158158
) {
159-
let owned = std::mem::replace(this, StatsSet::default());
159+
let owned = std::mem::take(this);
160160
*this = owned.merge_unordered(other_stat, dtype);
161161
}
162162

vortex-file/src/multi/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl MultiFileDataSource {
192192
.iter()
193193
.map(|(f, fs)| {
194194
Arc::new(VortexFileReaderFactory {
195-
fs: Arc::clone(&fs),
195+
fs: Arc::clone(fs),
196196
file: f.clone(),
197197
session: self.session.clone(),
198198
open_options_fn: Arc::clone(&self.open_options_fn),

vortex-layout/src/reader.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

4-
use std::any::Any;
54
use std::collections::BTreeSet;
65
use std::ops::Range;
76
use std::sync::Arc;

vortex-layout/src/scan/layout.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ use futures::stream::StreamExt;
1616
use vortex_array::IntoArray;
1717
use vortex_array::arrays::ConstantArray;
1818
use vortex_array::dtype::DType;
19-
use vortex_array::dtype::FieldPath;
2019
use vortex_array::dtype::Nullability;
2120
use vortex_array::expr::Expression;
2221
use vortex_array::expr::stats::Precision;
2322
use vortex_array::scalar::Scalar;
24-
use vortex_array::stats::StatsSet;
2523
use vortex_array::stream::ArrayStreamAdapter;
2624
use vortex_array::stream::ArrayStreamExt;
2725
use vortex_array::stream::SendableArrayStream;

0 commit comments

Comments
 (0)