Skip to content

Port Arroyo patches to sqlparser 0.62 - #3

Merged
QnJ1c2kNCg merged 5 commits into
ArroyoSystems:0.62.0/arroyofrom
QnJ1c2kNCg:broy/sqlparser-0.62-port
Sep 17, 2026
Merged

QnJ1c2kNCg merged 5 commits into
ArroyoSystems:0.62.0/arroyofrom
QnJ1c2kNCg:broy/sqlparser-0.62-port

Conversation

@QnJ1c2kNCg

@QnJ1c2kNCg QnJ1c2kNCg commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

This PR takes the patches from our internal fork and applies them to a clean sqlparser 0.62 branch.

The original custom commits can be found here. I find that it's easiest to review the PR with the original commits next to it.

Original Actual scope sqlparser 0.62 outcome
32b9bbe Arroyo dialect with PostgreSQL-style expressions and struct types Ported as b1d5973; adapted to the 0.62 dialect APIs, new Colon precedence, and capabilities already supplied upstream
83877ac Allow generated columns without STORED in the Arroyo dialect Folded into b1d5973; preserves Arroyo-specific behavior while PostgreSQL continues to require STORED
2279ac9 WATERMARK FOR column [AS expr] table constraints Ported as 6c70e08; adapted to the relocated constraint AST and gated through a dialect capability
8c1c36b METADATA FROM column options with key spans and escaping Ported as b90d82a; preserves the metadata key and source span with a dialect capability gate
7086ac7 Connector PARTITIONED BY expressions following table options Ported as c09cc5c; adapted to the new table-options and builder APIs while preserving upstream Hive partitions

8c009b7: A new commit addressing Clippy warnings introduced by Rust 1.98

Testing
Validated with the full sqlparser test suite, formatting, strict Clippy, and a 70-case compatibility corpus in default and bigdecimal modes; 69/70 cases pass, with the sole failure reproduced in stock 0.62 as an existing BigQuery formatter bug.

Preserve PostgreSQL-style expressions and Arroyo capabilities using dialect hooks instead of additional concrete dialect checks. Keep Arroyo type identity so generated columns do not require STORED; cover this behavior with a PostgreSQL comparison regression.

Ported-from: 32b9bbe
Ported-from: 83877ac
Preserve optional watermark expressions, constraint spans and formatting. Gate the syntax with a dialect capability, enabled for Arroyo and Generic; cover missing syntax, named constraints and PostgreSQL rejection.

Ported-from: 2279ac9
Retain the metadata key and its source span, with a capability gate checked before consuming tokens. Cover escaped keys, round trips, malformed input and rejection by PostgreSQL.

Ported-from: 8c1c36b
Retain the arroyo_partitions AST field and builder conversions for Iceberg transforms and identity partitions. Keep the existing clause position after table options, preserving upstream Hive partition column parsing. Include source spans and regression tests for round trips, builder conversions, dialect boundaries and malformed clauses.

Ported-from: 7086ac7
@QnJ1c2kNCg
QnJ1c2kNCg merged commit 9aca5eb into ArroyoSystems:0.62.0/arroyo Sep 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants