Skip to content

Commit

Permalink
style: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sdd committed Jul 30, 2024
1 parent 367ee13 commit c25a1a9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
32 changes: 16 additions & 16 deletions crates/iceberg/benches/table_scan_plan_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ use futures_util::StreamExt;
use tokio::runtime::Runtime;

mod utils;
use utils::build_catalog;

use iceberg::expr::Reference;
use iceberg::spec::Datum;
use iceberg::table::Table;
use iceberg::Catalog;
use utils::build_catalog;

async fn setup_async() -> Table {
let catalog = build_catalog().await;
Expand Down Expand Up @@ -82,20 +81,21 @@ async fn all_files_some_rows(table: &Table) {
}

async fn one_file_some_rows(table: &Table) {
let scan = table
.scan()
.with_filter(
Reference::new("tpep_pickup_datetime")
.greater_than_or_equal_to(
Datum::timestamptz_from_str("2024-02-01T00:00:00.000 UTC").unwrap(),
)
.and(Reference::new("tpep_pickup_datetime").less_than(
Datum::timestamptz_from_str("2024-02-02T00:00:00.000 UTC").unwrap(),
))
.and(Reference::new("passenger_count").equal_to(Datum::double(1.0))),
)
.build()
.unwrap();
let scan =
table
.scan()
.with_filter(
Reference::new("tpep_pickup_datetime")
.greater_than_or_equal_to(
Datum::timestamptz_from_str("2024-02-01T00:00:00.000 UTC").unwrap(),
)
.and(Reference::new("tpep_pickup_datetime").less_than(
Datum::timestamptz_from_str("2024-02-02T00:00:00.000 UTC").unwrap(),
))
.and(Reference::new("passenger_count").equal_to(Datum::double(1.0))),
)
.build()
.unwrap();
let mut stream = scan.plan_files().await.unwrap();

while let Some(item) = stream.next().await {
Expand Down
3 changes: 2 additions & 1 deletion crates/iceberg/benches/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
// specific language governing permissions and limitations
// under the License.

use std::collections::HashMap;

use iceberg::io::{S3_ACCESS_KEY_ID, S3_ENDPOINT, S3_REGION, S3_SECRET_ACCESS_KEY};
use iceberg_catalog_rest::{RestCatalog, RestCatalogConfig};
use iceberg_test_utils::docker::DockerCompose;
use std::collections::HashMap;

pub fn get_docker_compose() -> DockerCompose {
DockerCompose::new(
Expand Down
7 changes: 4 additions & 3 deletions crates/iceberg/tests/read_performance_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

//! Performance tests for FileIO S3 table scans

use std::collections::HashMap;
use std::process::Command;
use std::sync::RwLock;

use ctor::{ctor, dtor};
use futures_util::stream::TryStreamExt;
use iceberg::io::{
Expand All @@ -26,9 +30,6 @@ use iceberg::Catalog;
use iceberg_catalog_rest::{RestCatalog, RestCatalogConfig};
use iceberg_test_utils::docker::DockerCompose;
use iceberg_test_utils::{normalize_test_name, set_up};
use std::collections::HashMap;
use std::process::Command;
use std::sync::RwLock;

static DOCKER_COMPOSE_ENV: RwLock<Option<DockerCompose>> = RwLock::new(None);

Expand Down

0 comments on commit c25a1a9

Please sign in to comment.