Skip to content

Commit

Permalink
Missed cleanups from schema transform PR (#398)
Browse files Browse the repository at this point in the history
Change a stray debugging `println!` into a proper `warn!`. Also format a
`match` more nicely.
  • Loading branch information
scovich authored Oct 15, 2024
1 parent e493c1f commit 313272e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions kernel/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,11 @@ impl StructField {
}

pub fn make_physical(&self, mapping_mode: ColumnMappingMode) -> DeltaResult<Self> {
use ColumnMappingMode::*;
match mapping_mode {
ColumnMappingMode::Id => {
return Err(Error::generic("Column ID mapping mode not supported"))
}
ColumnMappingMode::None => return Ok(self.clone()),
ColumnMappingMode::Name => {} // fall out
Id => return Err(Error::generic("Column ID mapping mode not supported")),
None => return Ok(self.clone()),
Name => {} // fall out
}

struct ApplyNameMapping;
Expand Down Expand Up @@ -777,7 +776,7 @@ impl SchemaDepthChecker {
if self.max_depth_seen < self.current_depth {
self.max_depth_seen = self.current_depth;
if self.depth_limit < self.current_depth {
println!("Max depth {} exceeded by {:?}", self.depth_limit, arg);
tracing::warn!("Max schema depth {} exceeded by {arg:?}", self.depth_limit);
}
}
if self.depth_limit < self.max_depth_seen {
Expand Down

0 comments on commit 313272e

Please sign in to comment.