mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 03:07:20 +00:00
extract operator: add support for Postgres keywords (#427)
Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
This commit is contained in:
parent
0d1c5d1205
commit
3af3ca07b6
4 changed files with 88 additions and 0 deletions
|
@ -1388,6 +1388,21 @@ fn parse_extract() {
|
|||
verified_stmt("SELECT EXTRACT(HOUR FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(MINUTE FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(SECOND FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(CENTURY FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(DECADE FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(DOW FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(DOY FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(EPOCH FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(ISODOW FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(ISOYEAR FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(JULIAN FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(MICROSECONDS FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(MILLENIUM FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(MILLISECONDS FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(QUARTER FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(TIMEZONE FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(TIMEZONE_HOUR FROM d)");
|
||||
verified_stmt("SELECT EXTRACT(TIMEZONE_MINUTE FROM d)");
|
||||
|
||||
let res = parse_sql_statements("SELECT EXTRACT(MILLISECOND FROM d)");
|
||||
assert_eq!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue