andygrove commented on code in PR #3829:
URL: https://github.com/apache/arrow-datafusion/pull/3829#discussion_r995783659
##########
datafusion/physical-expr/src/unicode_expressions.rs:
##########
@@ -262,24 +273,29 @@ pub fn rpad<T: OffsetSizeTrait>(args: &[ArrayRef]) ->
Result<ArrayRef> {
.zip(length_array.iter())
.map(|(string, length)| match (string, length) {
(Some(string), Some(length)) => {
- let length = length as usize;
+ if length > i32::MAX as i64 {
+ return Err(DataFusionError::Internal(
+ "lpad requested length too large".to_string(),
Review Comment:
```suggestion
"rpad requested length too
large".to_string(),
```
--
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]