alamb commented on code in PR #20617:
URL: https://github.com/apache/datafusion/pull/20617#discussion_r3067864875
##########
datafusion/functions-nested/src/resize.rs:
##########
@@ -232,21 +321,13 @@ fn general_list_resize<O: OffsetSizeTrait + TryInto<i64>>(
let count = O::usize_as(count);
let start = offset_window[0];
if start + count > offset_window[1] {
- let extra_count =
- (start + count - offset_window[1]).try_into().map_err(|_| {
- internal_datafusion_err!(
- "array_resize: failed to convert size to i64"
- )
- })?;
+ let extra_count = (start + count -
offset_window[1]).to_usize().unwrap();
Review Comment:
why was this changed to unwrap (which will panic) from a internal error?
##########
datafusion/functions-nested/src/resize.rs:
##########
@@ -232,21 +321,13 @@ fn general_list_resize<O: OffsetSizeTrait + TryInto<i64>>(
let count = O::usize_as(count);
let start = offset_window[0];
if start + count > offset_window[1] {
- let extra_count =
- (start + count - offset_window[1]).try_into().map_err(|_| {
- internal_datafusion_err!(
- "array_resize: failed to convert size to i64"
- )
- })?;
+ let extra_count = (start + count -
offset_window[1]).to_usize().unwrap();
Review Comment:
Maybe because the calls below to `unwrap()` would have panic'd anyways
--
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]