Skip to content

Commit

Permalink
refactor: remove batch size for now
Browse files Browse the repository at this point in the history
  • Loading branch information
tshauck committed Mar 25, 2024
1 parent 075cb21 commit f7e8973
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
12 changes: 0 additions & 12 deletions src/datafusion/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ use std::sync::Arc;

use object_store::ObjectStore;

const DEFAULT_BATCH_SIZE: usize = 8096;

/// Configuration for Zarr DataFusion processing.
#[derive(Clone)]
pub struct ZarrConfig {
Expand All @@ -29,9 +27,6 @@ pub struct ZarrConfig {

/// The projection for the scan.
pub projection: Option<Vec<usize>>,

/// The batch size for the scan.
pub batch_size: usize,
}

impl ZarrConfig {
Expand All @@ -40,16 +35,9 @@ impl ZarrConfig {
Self {
object_store,
projection: None,
batch_size: DEFAULT_BATCH_SIZE,
}
}

/// Set the batch size for the scan.
pub fn with_batch_size(mut self, batch_size: usize) -> Self {
self.batch_size = batch_size;
self
}

/// Set the projection for the scan.
pub fn with_projection(mut self, projection: Option<Vec<usize>>) -> Self {
self.projection = projection;
Expand Down
7 changes: 2 additions & 5 deletions src/datafusion/scanner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@ impl ExecutionPlan for ZarrScan {
.runtime_env()
.object_store(&self.base_config.object_store_url)?;

let batch_size = context.session_config().batch_size();

let config = ZarrConfig::new(object_store)
.with_batch_size(batch_size)
.with_projection(self.base_config.projection.clone());
let config =
ZarrConfig::new(object_store).with_projection(self.base_config.projection.clone());

let opener = ZarrFileOpener::new(config);

Expand Down

0 comments on commit f7e8973

Please sign in to comment.