AndreaScotti01 opened a new pull request, #2634: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2634
Related: #2379 (its planned PR 5 adds Doris `LOAD DATA INFILE`, which could reuse the dialect flag added here) `LOAD DATA ... INFILE` fails to parse with `MySqlDialect`: ```sql LOAD DATA LOCAL INFILE '/tmp/x.csv' REPLACE INTO TABLE t FIELDS TERMINATED BY '|' (a, b) -- Expected: `DATA` or an extension name after `LOAD`, found: LOCAL ``` This adds the statement as documented in https://dev.mysql.com/doc/refman/8.4/en/load-data.html: - new `Dialect::supports_load_data_infile()` (enabled for MySQL) and `Statement::LoadDataInfile` - `FIELDS` / `LINES` options follow the documented order; `COLUMNS` and `IGNORE n ROWS` print as `FIELDS` and `IGNORE n LINES` - statements in the tests were checked against MySQL 8.4.8 Open questions: - separate variant, or extend the Hive-shaped `Statement::LoadData`? - MySQL itself accepts `FIELDS` / `LINES` options in any order; should the parser be lenient too? -- 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]
