mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-16 04:54:59 +00:00
Support DATETIME
keyword (#512)
This commit is contained in:
parent
aa46e930c5
commit
d19d955d9b
4 changed files with 18 additions and 0 deletions
|
@ -2615,6 +2615,19 @@ fn parse_literal_time() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_literal_datetime() {
|
||||
let sql = "SELECT DATETIME '1999-01-01 01:23:34.45'";
|
||||
let select = verified_only_select(sql);
|
||||
assert_eq!(
|
||||
&Expr::TypedString {
|
||||
data_type: DataType::Datetime,
|
||||
value: "1999-01-01 01:23:34.45".into()
|
||||
},
|
||||
expr_from_projection(only(&select.projection)),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_literal_timestamp() {
|
||||
let sql = "SELECT TIMESTAMP '1999-01-01 01:23:34'";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue