[format] Support size based ORC memory protection for large rows - #9534
Open
ArnavBalyan wants to merge 1 commit into
Open
[format] Support size based ORC memory protection for large rows#9534ArnavBalyan wants to merge 1 commit into
ArnavBalyan wants to merge 1 commit into
Conversation
JingsongLi
reviewed
Sep 2, 2026
| rowsSinceCheck < rowsPerCheck && stripeSizePerCheck == 0 | ||
| ? 0 | ||
| : treeWriter.estimateMemory(); | ||
| if (rowsSinceCheck >= rowsPerCheck || size > stripeSizePerCheck) { |
Contributor
There was a problem hiding this comment.
[P2] Honor sub-1 stripe-size ratios
This new gate says a stripe is checked once estimateMemory() exceeds ratio * orc.stripe.size, but the unchanged flush condition below still compares only with memoryLimit (normally the full stripe size). For example, with ratio 0.5 and an unscaled writer, this branch starts firing at half a stripe, resets rowsSinceCheck on every subsequent batch, yet does not flush until the estimate exceeds the full stripe size. That both violates the option description and adds an estimate on every batch in between. Please either flush against the configured threshold (while still respecting a lower MemoryManager limit), or reject/document ratios below 1 if they are not supported.
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.
Purpose
Tests