Skip to content

Commit 025c1e6

Browse files
committed
Remove unused imports
Signed-off-by: Abhi Agarwal <[email protected]>
1 parent aa1691a commit 025c1e6

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

crates/benchmarks/Cargo.toml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ chrono = { workspace = true }
1616
url = { workspace = true }
1717
tempfile = { workspace = true }
1818

19-
# arrow
20-
arrow = { workspace = true }
21-
arrow-array = { workspace = true }
22-
23-
# serde
24-
serde_json = { workspace = true }
25-
26-
# datafusion
27-
datafusion = { workspace = true }
28-
2919
[dependencies.deltalake-core]
3020
path = "../core"
3121
version = "0"

crates/benchmarks/src/lib.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
use std::path::Path;
22

3-
use datafusion::logical_expr::{cast, lit};
4-
use datafusion::prelude::DataFrame;
5-
use datafusion::prelude::ParquetReadOptions;
3+
use deltalake_core::datafusion::functions::expr_fn;
64
use deltalake_core::kernel::engine::arrow_conversion::TryIntoKernel;
75
use deltalake_core::kernel::{StructField, StructType};
86
use deltalake_core::operations::merge::MergeBuilder;
9-
use deltalake_core::DeltaResult;
10-
use deltalake_core::{datafusion::prelude::SessionContext, DeltaOps, DeltaTable, DeltaTableError};
7+
use deltalake_core::{arrow, DeltaResult};
8+
use deltalake_core::{
9+
datafusion::{
10+
logical_expr::{cast, lit},
11+
prelude::{DataFrame, ParquetReadOptions, SessionContext},
12+
},
13+
DeltaOps, DeltaTable, DeltaTableError,
14+
};
1115
use tempfile::TempDir;
1216
use url::Url;
1317

@@ -164,16 +168,14 @@ pub async fn prepare_source_and_table(
164168
// Split matched and not-matched portions
165169
let matched = source
166170
.clone()
167-
.filter(datafusion::functions::expr_fn::random().lt_eq(lit(params.sample_matched_rows)))?;
171+
.filter(expr_fn::random().lt_eq(lit(params.sample_matched_rows)))?;
168172

169173
let rand = cast(
170-
datafusion::functions::expr_fn::random() * lit(u32::MAX),
171-
datafusion::arrow::datatypes::DataType::Int64,
174+
expr_fn::random() * lit(u32::MAX),
175+
arrow::datatypes::DataType::Int64,
172176
);
173177
let not_matched = source
174-
.filter(
175-
datafusion::functions::expr_fn::random().lt_eq(lit(params.sample_not_matched_rows)),
176-
)?
178+
.filter(expr_fn::random().lt_eq(lit(params.sample_not_matched_rows)))?
177179
.with_column("wr_item_sk", rand.clone())?
178180
.with_column("wr_order_number", rand)?;
179181

0 commit comments

Comments
 (0)