Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
zachschuermann committed Oct 8, 2024
1 parent b5f1a19 commit 1fc8034
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions kernel/src/engine/default/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ impl<E: TaskExecutor> JsonHandler for DefaultJsonHandler<E> {
}

// note: for now we just buffer all the data and write it out all at once
fn write_json_file<'a>(
fn write_json_file(
&self,
path: &url::Url,
data: Box<dyn Iterator<Item = Box<dyn EngineData>> + Send + 'a>,
data: Box<dyn Iterator<Item = Box<dyn EngineData>> + Send + '_>,
_overwrite: bool,
) -> DeltaResult<()> {
let mut schema: Option<ArrowSchemaRef> = None;
Expand Down
4 changes: 2 additions & 2 deletions kernel/src/engine/sync/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ impl JsonHandler for SyncJsonHandler {
arrow_parse_json(json_strings, output_schema)
}

fn write_json_file<'a>(
fn write_json_file(
&self,
_path: &Url,
_data: Box<dyn Iterator<Item = Box<dyn EngineData>> + Send + 'a>,
_data: Box<dyn Iterator<Item = Box<dyn EngineData>> + Send + '_>,
_overwrite: bool,
) -> DeltaResult<()> {
unimplemented!()
Expand Down
4 changes: 2 additions & 2 deletions kernel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ pub trait JsonHandler: Send + Sync {
///
/// NOTE: the `overwrite` flag isn't used for the existing commit flow, but will be used in the
/// future to write `_last_checkpoint` files.
fn write_json_file<'a>(
fn write_json_file(
&self,
path: &Url,
data: Box<dyn Iterator<Item = Box<dyn EngineData>> + Send + 'a>,
data: Box<dyn Iterator<Item = Box<dyn EngineData>> + Send + '_>,
overwrite: bool,
) -> DeltaResult<()>;
}
Expand Down
9 changes: 4 additions & 5 deletions kernel/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ impl Transaction {
match json_handler.write_json_file(commit_path, Box::new(actions), false) {
Ok(()) => Ok(CommitResult::Committed(commit_version)),
Err(crate::error::Error::ObjectStore(object_store::Error::AlreadyExists {
path: _,
source: _,
..
})) => Ok(CommitResult::Conflict(self, commit_version)),
Err(e) => Err(e),
}
Expand Down Expand Up @@ -98,11 +97,11 @@ pub enum CommitResult {
// (1) the commitInfo action to commit (and append more actions to) and
// (2) the schema for the actions to commit (this is determined by the engine's commit info schema)
#[allow(clippy::type_complexity)]
fn generate_commit_info<'a>(
engine: &'a dyn Engine,
fn generate_commit_info(
engine: &'_ dyn Engine,
engine_commit_info: Option<EngineCommitInfo>,
) -> DeltaResult<(
Box<dyn Iterator<Item = Box<dyn EngineData>> + Send + 'a>,
Box<dyn Iterator<Item = Box<dyn EngineData>> + Send + '_>,
SchemaRef,
)> {
use crate::actions::{
Expand Down

0 comments on commit 1fc8034

Please sign in to comment.