princejain756 opened a new pull request, #2700: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2700
MySQL and MariaDB accept 11 compound time units in `EXTRACT(unit FROM expr)` and `INTERVAL expr unit` expressions (`SECOND_MICROSECOND`, `MINUTE_MICROSECOND`, `MINUTE_SECOND`, `HOUR_MICROSECOND`, `HOUR_SECOND`, `HOUR_MINUTE`, `DAY_MICROSECOND`, `DAY_SECOND`, `DAY_MINUTE`, `DAY_HOUR`, `YEAR_MONTH`), which previously failed with `Expected: date/time field` or `INTERVAL requires a unit after the literal value`: - https://dev.mysql.com/doc/refman/8.4/en/expressions.html#temporal-intervals - https://mariadb.com/docs/server/reference/sql-functions/date-time-functions/date-and-time-units This change adds the 11 compound unit keywords and `DateTimeField` variants and recognizes them in `Parser::parse_date_time_field` and `Parser::next_token_is_temporal_unit`. Closes #2693 Dialects: MySQL, MariaDB -- 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]
