HippoBaro commented on code in PR #9653:
URL: https://github.com/apache/arrow-rs/pull/9653#discussion_r3089836376
##########
parquet/src/arrow/arrow_writer/byte_array.rs:
##########
@@ -466,12 +466,25 @@ impl ColumnValueEncoder for ByteArrayEncoder {
})
}
- fn write(&mut self, _values: &Self::Values, _offset: usize, _len: usize)
-> Result<()> {
- unreachable!("should call write_gather instead")
+ fn write(&mut self, values: &Self::Values, offset: usize, len: usize) ->
Result<()> {
+ downcast_op!(
Review Comment:
Yes! The code is now able to distinguish between `Dense { offset, len }` and
`Sparse(Vec<usize>)`. When the column has no nulls, `write_leaf` produces
`Dense` directly without materializing a vec like previously and
`write_mini_batch` then calls `encoder.write(values, offset, len)` based on
that. Neat!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]