Skip to content

Port Arroyo SQL extensions to sqlparser 0.62 - #2

Closed
QnJ1c2kNCg wants to merge 4 commits into
ArroyoSystems:0.62.0/arroyofrom
QnJ1c2kNCg:broy/sqlparser-0.62-port
Closed

QnJ1c2kNCg wants to merge 4 commits into
ArroyoSystems:0.62.0/arroyofrom
QnJ1c2kNCg:broy/sqlparser-0.62-port

Conversation

@QnJ1c2kNCg

Copy link
Copy Markdown
Collaborator

sqlparser 0.62: review guide

PR: broy/sqlparser-0.62-port -> 0.62.0/arroyo. Preserve the four commits. These are adapted ports, not unchanged cherry-picks; each has Ported-from trailers. Review the old behavior against the new implementation:

Patch / new commit Original commit(s) Review focus
Dialect / 9848a90 32b9bbe, 83877ac Preserve PostgreSQL-style expressions, struct types, and optional STORED. Updated dialect APIs; delegating precedence and replacing concrete dialect checks with capability hooks are deliberate restructuring.
WATERMARK / 40f5172 2279ac9 Preserve WATERMARK FOR column [AS expr]. Required: adapt to the relocated constraint AST. Deliberate: capability gate instead of concrete dialect checks.
METADATA / 8a28842 8c1c36b Preserve the metadata key, span, and escaping. Deliberate: check the capability before consuming keywords.
PARTITIONED BY / 7265c48 7086ac7 Preserve connector expressions after table options without changing Hive partitions. Required: updated table-options/builder APIs. Additional coverage: partition source spans.

Capability hooks follow upstream contributor guidelines; they are not all required by the version upgrade. Regression tests are in tests/sqlparser_arroyo.rs: expressions/STORED, watermarks, metadata, connector/Hive partitions, round-trips, and rejection cases.

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 force-pushed the broy/sqlparser-0.62-port branch from 7265c48 to 887b4ea Compare September 14, 2026 22:53
@QnJ1c2kNCg QnJ1c2kNCg closed this Sep 14, 2026
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.

1 participant