Skip to content

Commit

Permalink
style: fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
evenyag committed Apr 30, 2024
1 parent ff98cd5 commit e7e5dc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/mito2/src/sst/parquet/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl ReadFormat {

// Maps column id of a projected field to its index in SST.
let mut projected_field_id_index: Vec<_> = column_ids
.into_iter()
.iter()
.filter_map(|column_id| {
// Only apply projection to fields.
field_id_to_index
Expand Down
7 changes: 2 additions & 5 deletions src/mito2/src/sst/parquet/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,7 @@ impl ParquetReaderBuilder {
let region_meta = Arc::new(Self::get_region_metadata(&file_path, key_value_meta)?);
// Lists all column ids to read, we always use the expected metadata if possible.
let column_ids = self.projection.clone().unwrap_or_else(|| {
let expected_meta = self
.expected_metadata
.as_ref()
.unwrap_or_else(|| &region_meta);
let expected_meta = self.expected_metadata.as_ref().unwrap_or(&region_meta);
expected_meta
.column_metadatas
.iter()
Expand Down Expand Up @@ -531,7 +528,7 @@ impl ReaderState {
fn metrics(&self) -> &Metrics {
match self {
ReaderState::Readable(reader) => &reader.metrics,
ReaderState::Exhausted(m) => &m,
ReaderState::Exhausted(m) => m,
}
}
}
Expand Down

0 comments on commit e7e5dc6

Please sign in to comment.