LucaCappelletti94 opened a new pull request, #2575: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2575
SQLite ends `CREATE TABLE` with a comma-separated list of table options, `WITHOUT ROWID` and `STRICT`, in any order and optionally preceded by a comma ([SQLite docs](https://www.sqlite.org/lang_createtable.html)). The parser read the two keywords at unrelated points of the statement, so `CREATE TABLE a (id INTEGER PRIMARY KEY) WITHOUT ROWID, STRICT`, its reverse and `(...), STRICT` failed to parse. The one spelling it accepted, `WITHOUT ROWID STRICT`, is one SQLite refuses, and a table with both options rendered back to it. The `without_rowid` and `strict` flags on `CreateTable` become one `sqlite_table_options` field holding the options in source order and whether a comma precedes them. Output therefore matches input, which matters because SQLite stores that text verbatim in `sqlite_schema`. The comma-less spelling now fails as it does in SQLite. #208 and #898 added each option on its own. -- 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]
