Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ion-elgreco committed Jan 1, 2024
1 parent 94c5366 commit d040273
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
8 changes: 3 additions & 5 deletions crates/deltalake-core/src/operations/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,20 +249,18 @@ async fn execute(

metrics.execution_time_ms = Instant::now().duration_since(exec_start).as_micros();


let mut app_metadata = match app_metadata {
Some(meta) => meta,
None => HashMap::new()
};
None => HashMap::new(),
};

app_metadata.insert("readVersion".to_owned(), snapshot.version().into());

let delete_metrics = serde_json::to_value(metrics.clone());

if let Ok(map) = delete_metrics {
app_metadata.insert("operationMetrics".to_owned(), map);
}


// Do not make a commit when there are zero updates to the state
if !actions.is_empty() {
Expand Down
8 changes: 3 additions & 5 deletions crates/deltalake-core/src/operations/merge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1390,20 +1390,18 @@ async fn execute(

metrics.execution_time_ms = Instant::now().duration_since(exec_start).as_millis() as u64;


let mut app_metadata = match app_metadata {
Some(meta) => meta,
None => HashMap::new()
};
None => HashMap::new(),
};

app_metadata.insert("readVersion".to_owned(), snapshot.version().into());

let merge_metrics = serde_json::to_value(metrics.clone());

if let Ok(map) = merge_metrics {
app_metadata.insert("operationMetrics".to_owned(), map);
}


// Do not make a commit when there are zero updates to the state
if !actions.is_empty() {
Expand Down
6 changes: 3 additions & 3 deletions crates/deltalake-core/src/operations/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ async fn execute(

let mut app_metadata = match app_metadata {
Some(meta) => meta,
None => HashMap::new()
};
None => HashMap::new(),
};

app_metadata.insert("readVersion".to_owned(), snapshot.version().into());

let update_metrics = serde_json::to_value(metrics.clone());
Expand Down

0 comments on commit d040273

Please sign in to comment.