Skip to content

Commit

Permalink
fix nested list order propagation and test
Browse files Browse the repository at this point in the history
  • Loading branch information
orlp committed Oct 17, 2024
1 parent b05f51c commit 0718692
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/polars-row/src/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ unsafe fn encode_array(encoder: &Encoder, field: &EncodingField, out: &mut RowsE
match encoder {
Encoder::List { .. } => {
let iter = encoder.list_iter();
crate::variable::encode_iter(iter, out, &EncodingField::new_unsorted())
crate::variable::encode_iter(iter, out, field)
},
Encoder::Leaf(array) => {
match array.dtype() {
Expand Down Expand Up @@ -374,7 +374,7 @@ fn allocate_rows_buf(
row_size_fixed
+ crate::variable::encoded_len(
opt_val,
&EncodingField::new_unsorted(),
&field,
),
);
}
Expand All @@ -383,7 +383,7 @@ fn allocate_rows_buf(
for (opt_val, row_length) in iter.zip(lengths.iter_mut()) {
*row_length += crate::variable::encoded_len(
opt_val,
&EncodingField::new_unsorted(),
&field,
)
}
}
Expand Down Expand Up @@ -637,7 +637,7 @@ mod test {
let out = out.into_array();
assert_eq!(
out.values().iter().map(|v| *v as usize).sum::<usize>(),
82411
42774
);
}
}

0 comments on commit 0718692

Please sign in to comment.