Skip to content

Commit

Permalink
minor fix on checking index (#6694)
Browse files Browse the repository at this point in the history
Co-authored-by: jp0317 <[email protected]>
  • Loading branch information
jp0317 and jp0317 authored Nov 6, 2024
1 parent 88b296c commit 9054bdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parquet/src/schema/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ fn from_thrift_helper(elements: &[SchemaElement], index: usize) -> Result<(usize
// There is only one message type node in the schema tree.
let is_root_node = index == 0;

if index > elements.len() {
if index >= elements.len() {
return Err(general_err!(
"Index out of bound, index = {}, len = {}",
index,
Expand Down

0 comments on commit 9054bdf

Please sign in to comment.