Fix 67 parser issues: DROP TABLE multiple tables, negative literals, empty tuple ORDER BY#14
Merged
kyleconroy merged 2 commits intomainfrom Dec 14, 2025
Conversation
…empty tuple ORDER BY Parser improvements: - DROP TABLE with multiple tables: now captures all table names in Tables slice - ORDER BY (): now stores empty tuple literal instead of discarding it - PRIMARY KEY (): same fix as ORDER BY for empty tuples - Multiple table parsing handles qualified names (db.table) Explain layer improvements: - Negative integer/float literals output as Literal Int64_-N instead of Function negate - Empty tuple in ORDER BY/PRIMARY KEY renders as Function tuple with empty ExpressionList - DROP TABLE with multiple tables renders ExpressionList with TableIdentifiers - Added FormatFloat helper function for consistent float formatting Test results: 6,000 passing (87.9%) vs previous 5,933 (86.9%) 67 additional tests now pass, skipped reduced from 891 to 824
The lexer now properly unescapes string literals: - \' → single quote - \\ → backslash - \n → newline - \t → tab - \r → carriage return - \0 → null byte - \b → backspace - \f → form feed - \xNN → hex byte value - '' → single quote (SQL-style escape) The explain layer re-escapes these characters for display in EXPLAIN AST output, using ClickHouse's double-escaping format (e.g., null becomes \\0). Test results improved from 6,000 to 6,006 passing tests.
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.
Parser improvements:
Explain layer improvements:
Test results: 6,000 passing (87.9%) vs previous 5,933 (86.9%)
67 additional tests now pass, skipped reduced from 891 to 824