AgenticSpark opened a new pull request, #56737:
URL: https://github.com/apache/spark/pull/56737
### What changes were proposed in this pull request?
The `CREATE TABLE` docs for both the datasource and Hive-format syntax
describe the `OPTIONS` and `TBLPROPERTIES` clauses using only the `key=val`
form. The grammar (`property` rule in `SqlBaseParser.g4`) also accepts a
space-separated `key val` form, where the `=` is optional. This updates the
docs to document both forms:
- `docs/sql-ref-syntax-ddl-create-table-datasource.md`: note the optional
`=` in the `OPTIONS` and `TBLPROPERTIES` syntax (`key1[=]val1`) and parameter
descriptions, plus a short example.
- `docs/sql-ref-syntax-ddl-create-table-hiveformat.md`: same for
`TBLPROPERTIES`.
### Why are the changes needed?
The docs only show the `key=val` form, so users aren't aware the equals sign
is optional even though the parser supports it (see the
`propertyWithKeyNoEquals` alternative in `SqlBaseParser.g4`). This addresses
SPARK-34525.
### Does this PR introduce _any_ user-facing change?
No. Documentation-only change.
### How was this patch tested?
Documentation-only change. Verified the claim against the `property` rule in
`sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseParser.g4`,
which has both `propertyWithKeyAndEquals` and `propertyWithKeyNoEquals`
(`value=propertyValue?`) alternatives, confirming `OPTIONS ('header' 'true')`
and `TBLPROPERTIES ('foo' 'bar')` are valid.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: GitHub Copilot CLI
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]