Repository navigation
fix(syntax): accept function calls nested up to 256 deep - #234
Merged
Merged
Conversation
The complexity guard refused function calls nested more than 64 deep, while Snowflake parses ABS, COALESCE and arithmetic nested 100 deep, so valid statements were refused. The default limit is now 256, the limit the shared parse layer already uses, and deeper nesting is still refused with the guard's function nesting error. The depth probe parses nested calls on a 2 MiB thread in every native parser and profile, and a new analysed construct holds parsing and analysis of nested calls to the probe's time bound. The parser grows its stack on demand, so the caller's thread size, including a Windows main thread or the Python wheel's, does not bound the new depth; on wasm the parser depth guard still caps recursion. The ABS and COALESCE receipts this resolves leave the disagreement list.
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.
Why
The complexity guard refused function calls nested more than 64 deep, but Snowflake's receipts show it parsing ABS, COALESCE and arithmetic nested 100 deep, so valid statements were refused (two receipts were listed as disagreements).
Changes
E_GUARD_FUNCTION_NESTING_DEPTH_EXCEEDED.receipt-disagreements.toml.Verification
make depth-probe(gate) andmake depth-probe-debug(dev): every construct in every native parser is clean on a 2 MiB thread, including the new analysed construct within its 500 ms bound.syntax-coverage diffexits 0;make check-cipasses on the final head.