buraksenn commented on code in PR #23306:
URL: https://github.com/apache/datafusion/pull/23306#discussion_r3524887809
##########
datafusion/functions-nested/src/resize.rs:
##########
@@ -342,12 +350,27 @@ where
)?))
}
+/// Largest element count whose eager value buffer stays within `isize::MAX`
+/// bytes, so `array_resize` rejects oversized results instead of panicking.
+/// Only primitive and `FixedSizeBinary` leaves are byte-exact.
+fn max_resize_values(value_type: &DataType) -> usize {
+ let element_width = match value_type {
+ DataType::FixedSizeBinary(size) if *size > 0 => {
+ (*size as usize).saturating_mul(u8::BITS as usize)
Review Comment:
we don't actually I actually mixed size of bytes and bits there. It just
narrowed the limit 1/8 but `size` is already byte and we should return it
there. changing this and rerunning tests now
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]