Skip to content

Commit

Permalink
[MINOR] after sqlparser update to 0.16, enable EXTRACT week. (#2157)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ted-Jiang authored Apr 4, 2022
1 parent 69ba713 commit 5ae3434
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions datafusion/core/tests/sql/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -727,15 +727,10 @@ async fn test_extract_date_part() -> Result<()> {
"9"
);
test_expression!("date_part('WEEK', CAST('2003-01-01' AS DATE))", "1");

// TODO Creating logical plan for 'SELECT EXTRACT(WEEK FROM to_timestamp('2020-09-08T12:00:00+00:00'))'
// SQL(ParserError("Expected date/time field, found: WEEK"))'
// will fix in sqlparser

// test_expression!(
// "EXTRACT(WEEK FROM to_timestamp('2020-09-08T12:00:00+00:00'))",
// "23"
// );
test_expression!(
"EXTRACT(WEEK FROM to_timestamp('2020-09-08T12:00:00+00:00'))",
"37"
);
test_expression!("date_part('DAY', CAST('2000-01-01' AS DATE))", "1");
test_expression!(
"EXTRACT(day FROM to_timestamp('2020-09-08T12:00:00+00:00'))",
Expand Down

0 comments on commit 5ae3434

Please sign in to comment.