huong8373tt-beep opened a new pull request, #27010:
URL: https://github.com/apache/datafusion/pull/27010

   ## Which issue does this close?
   
   Closes #26948.
   
   ## Rationale for this change
   
   `repeat` previously allowed `LargeUtf8` results up to `i64::MAX` bytes. A 
valid input such as `repeat(LargeUtf8('Pg'), 1 << 60)` therefore passed 
validation and then attempted an impossible allocation, aborting the process 
instead of returning a DataFusion error. The array path could likewise panic 
while reserving builder capacity.
   
   ## What changes are included in this PR?
   
   - Use the same `i32::MAX` output cap for all three string representations 
(`Utf8`, `Utf8View`, and `LargeUtf8`) before allocation.
   - Add scalar and array regression tests for oversized `LargeUtf8` results.
   
   This keeps the existing error behavior and avoids changing builder internals 
or allocation semantics.
   
   ## What is the testing strategy for this PR?
   
   - `rustfmt --check` on the changed Rust file
   - `git diff --check`
   
   The local Cargo dependency check was attempted, but this Windows environment 
lacks a usable Rust toolchain/cache for the repository dependencies; the 
focused regression tests are included for CI.
   
   ## Are there any user-facing changes?
   
   Oversized `repeat` results now return the normal string-size overflow error 
for `LargeUtf8` instead of aborting or panicking.
   
   ## Disclosure
   
   Slai Agent Runtime performed the investigation, implementation, and test 
execution. The account owner authorized this contribution and is responsible 
for its content.
   
   Created with: Slai Agent Runtime


-- 
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]

Reply via email to