Repository navigation
fix: prevent repeat from attempting impossible LargeUtf8 allocations - #27010
Closed
huong8373tt-beep wants to merge 1 commit into
Closed
huong8373tt-beep wants to merge 1 commit into
huong8373tt-beep wants to merge 1 commit into
Conversation
Author
|
Closing this duplicate now that the same issue is already covered by PR #26957. No further action is needed from maintainers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this close?
Closes #26948.
Rationale for this change
repeatpreviously allowedLargeUtf8results up toi64::MAXbytes. A valid input such asrepeat(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?
i32::MAXoutput cap for all three string representations (Utf8,Utf8View, andLargeUtf8) before allocation.LargeUtf8results.This keeps the existing error behavior and avoids changing builder internals or allocation semantics.
What is the testing strategy for this PR?
rustfmt --checkon the changed Rust filegit diff --checkThe 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
repeatresults now return the normal string-size overflow error forLargeUtf8instead 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