mbutrovich commented on code in PR #26957:
URL: https://github.com/apache/datafusion/pull/26957#discussion_r4486493559
##########
datafusion/functions/src/string/repeat.rs:
##########
@@ -519,6 +549,25 @@ mod tests {
);
}
+ #[test]
+ fn test_repeat_large_string_array_total_exceeds_max_size() {
+ // Each row is at the cap, but the total is larger than any allocation
+ // can satisfy, so a missing total check fails at once.
+ let n = 1 << 17;
+ let strings: ArrayRef =
Arc::new(LargeStringArray::from(vec![Some("a"); n]));
+ let counts: ArrayRef = Arc::new(Int64Array::from(vec![Some(u32::MAX as
i64); n]));
+
+ let err = super::repeat(&strings, &counts).unwrap_err().to_string();
Review Comment:
Could we use `strip_backtrace()` here so the exact comparison holds when the
`backtrace` feature is on?
```suggestion
let err = super::repeat(&strings, &counts)
.unwrap_err()
.strip_backtrace();
```
--
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]