Repository navigation
Conversation
`parse_function_args` parsed `name <operator> value` inside one `maybe_parse`. When the value failed, the whole argument was parsed again on the unnamed path, so every nesting level doubled the work. `SELECT u.u(k=u.u(k=...` with 22 unclosed levels took about 17s. Only `name <operator>` is speculative now. Once the operator matches, the value is parsed directly, so a failure inside it is reported once. Closes apache#3002
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.
Fixes exponential parse time for nested calls with named arguments.
parse_function_argswrappedname <operator> valuein a singlemaybe_parse. Whenvaluefailed, the whole argument was parsed againon the unnamed path, doubling work per nesting level. Only
name <operator>is speculative now, so the value is parsed once.SELECT u.u(k=u.u(k=...unclosed, 22 levels: 17.6s before, 0.3ms after.Root cause is separate from #3006, which notes #3002 still doubles there.
Dialects: all that support named function arguments (reported on DuckDB).
Adds a regression test and a fuzz seed.
Closes #3002