mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-23 11:12:51 +00:00
Support more DateTimeField variants (#1191)
This commit is contained in:
parent
8dd213cff2
commit
127be97369
6 changed files with 129 additions and 46 deletions
|
|
@ -1472,6 +1472,19 @@ fn parse_top() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_extract_custom_part() {
|
||||
let sql = "SELECT EXTRACT(eod FROM d)";
|
||||
let select = snowflake_and_generic().verified_only_select(sql);
|
||||
assert_eq!(
|
||||
&Expr::Extract {
|
||||
field: DateTimeField::Custom(Ident::new("eod")),
|
||||
expr: Box::new(Expr::Identifier(Ident::new("d"))),
|
||||
},
|
||||
expr_from_projection(only(&select.projection)),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_comma_outer_join() {
|
||||
// compound identifiers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue