Skip to content

Commit

Permalink
Minor clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rtyler committed Nov 12, 2023
1 parent a51ea88 commit 97e09bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 1 addition & 4 deletions rust/src/operations/optimize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -876,10 +876,7 @@ fn build_compaction_plan(

let part = PartitionTuples::from_hashmap(partition_keys, &add.partition_values);

partition_files
.entry(part)
.or_insert_with(Vec::new)
.push(object_meta);
partition_files.entry(part).or_default().push(object_meta);
}

for file in partition_files.values_mut() {
Expand Down
7 changes: 4 additions & 3 deletions rust/src/protocol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -836,9 +836,10 @@ impl DeltaOperation {
pub fn name(&self) -> &str {
// operation names taken from https://learn.microsoft.com/en-us/azure/databricks/delta/history#--operation-metrics-keys
match &self {
DeltaOperation::Create { mode, .. } if matches!(mode, SaveMode::Overwrite) => {
"CREATE OR REPLACE TABLE"
}
DeltaOperation::Create {
mode: SaveMode::Overwrite,
..
} => "CREATE OR REPLACE TABLE",
DeltaOperation::Create { .. } => "CREATE TABLE",
DeltaOperation::Write { .. } => "WRITE",
DeltaOperation::Delete { .. } => "DELETE",
Expand Down

0 comments on commit 97e09bf

Please sign in to comment.