Open
Conversation
bcb12d5 to
d23053c
Compare
…TRUCT types Adds a new `SparkSqlDialect` with the following features: - `CREATE TABLE ... USING <format>` via new `HiveIOFormat::Using` AST variant - `MAP<K, V>` angle-bracket type syntax (`supports_map_literal_with_angle_brackets`) - `STRUCT<field: type>` type parsing now driven by `supports_struct_literal()` trait method - `LONG` as an alias for `BIGINT` (`supports_long_type_as_bigint`) - Lambda functions, `DIV` integer division, aggregate `FILTER`, `SELECT * EXCEPT`, struct literals, nested comments, `!` as NOT, CTE without AS, multi-column aliases Also adds `tests/sqlparser_spark.rs` with 16 tests including integration with the Apache DataFusion Comet SQL test files (1,152 statements, all passing). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 15, 2026
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.
Summary
SparkSqlDialect(src/dialect/spark.rs) with support for the key Spark SQL syntax features needed to parse real-world Spark SQL workloadstests/sqlparser_spark.rswith tests based on tests from Comet projectNew Dialect trait methods (all default
false)supports_create_table_usingCREATE TABLE t (...) USING parquetsupports_long_type_as_bigintLONGas alias forBIGINTsupports_map_literal_with_angle_bracketsMAP<K, V>type syntaxParser/AST changes
HiveIOFormat::Using { format: Ident }variant — renders asUSING <format>, distinct from Hive'sSTORED AS <format>parse_hive_formatshandlesUSING <format>when dialect opts inSTRUCTtype parsing now usessupports_struct_literal()trait method instead ofdialect_is!(BigQueryDialect | DatabricksDialect | GenericDialect)— cleaner and extensibleMAP<K, V>angle-bracket parsing path inparse_data_type_helperSparkSqlDialect capabilities
USING <format>in CREATE TABLE, lambda functions,DIVinteger division, aggregateFILTER,GROUP BYexpressions/modifiers,SELECT * EXCEPT,STRUCT<>andMAP<>types,LONGtype alias, nested comments,!as NOT, CTE without AS, multi-column aliases,IGNORE NULLSin window functions (already supported by the generic parser).🤖 Generated with Claude Code