Skip to content

Commit

Permalink
Clippy and code comment suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
jupiter committed Apr 27, 2024
1 parent f9d26f3 commit 7cc42ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion parquet/src/arrow/arrow_reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,7 @@ mod tests {
])),
false,
)),
false.into(),
false,
),
true,
)]));
Expand Down
10 changes: 9 additions & 1 deletion parquet/src/arrow/schema/complex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,16 @@ impl Visitor {
let map_key = &map_key_value.get_fields()[0];
let map_value = &map_key_value.get_fields()[1];

if map_key.get_basic_info().repetition() == Repetition::REPEATED {
match map_key.get_basic_info().repetition() {
Repetition::REPEATED => {
return Err(arrow_err!("Map keys cannot be repeated"));
}
Repetition::REQUIRED | Repetition::OPTIONAL => {
// Relaxed check for having repetition REQUIRED as there exists
// parquet writers and files that do not conform to this standard.
// This allows us to consume a broader range of existing files even
// if they are out of spec.
}
}

if map_value.get_basic_info().repetition() == Repetition::REPEATED {
Expand Down

0 comments on commit 7cc42ce

Please sign in to comment.