fix(physical-expr): stack overflow protection#96
Merged
mhilton merged 1 commit intoupgrade-df-ver5100-afrom Apr 22, 2026
Merged
fix(physical-expr): stack overflow protection#96mhilton merged 1 commit intoupgrade-df-ver5100-afrom
mhilton merged 1 commit intoupgrade-df-ver5100-afrom
Conversation
Add the recursive annotation to create_physical_expr to protect from a stack overflow occurring due to some pathological query expressions.
mhilton
commented
Apr 22, 2026
| /// * `e` - The logical expression | ||
| /// * `input_dfschema` - The DataFusion schema for the input, used to resolve `Column` references | ||
| /// to qualified or unqualified fields by name. | ||
| #[recursive::recursive] |
Author
There was a problem hiding this comment.
Seeing as this is only until we manage to upgrade to datafusion 52 and I don't see any situations where we wouldn't turn this on I didn't make this a feature flag.
Collaborator
There was a problem hiding this comment.
BTW this use of recursive has non trivial cost (it basically adds checks on each function call, and this function is called a lot during planning)
That being said, I suspect we won't be able to measure any diference
lilic
approved these changes
Apr 22, 2026
Collaborator
|
Is this is a cherry-pick from an upstream change? |
Author
No I chose to just add the annotation. Upstream it is a feature which I felt added more complexity to the change than I would like. |
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.
Add the recursive annotation to create_physical_expr to protect from a stack overflow occurring due to some pathological query expressions.