sweb commented on code in PR #22323:
URL: https://github.com/apache/datafusion/pull/22323#discussion_r3258132189
##########
datafusion/functions-nested/src/range.rs:
##########
@@ -558,11 +577,10 @@ fn generate_range_values(
stop.saturating_sub(1)
};
if start > limit {
- return;
+ return Ok(());
}
- let count =
- (start.abs_diff(limit) / step.unsigned_abs()).saturating_add(1) as
usize;
- values.reserve(count);
Review Comment:
I changed to `try_reserve`, getting rid of the const. Thank you for the
suggestion!
--
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]