Skip to content

Commit 5ae3434

Browse files
authored
[MINOR] after sqlparser update to 0.16, enable EXTRACT week. (#2157)
1 parent 69ba713 commit 5ae3434

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

datafusion/core/tests/sql/expr.rs

+4-9
Original file line numberDiff line numberDiff line change
@@ -727,15 +727,10 @@ async fn test_extract_date_part() -> Result<()> {
727727
"9"
728728
);
729729
test_expression!("date_part('WEEK', CAST('2003-01-01' AS DATE))", "1");
730-
731-
// TODO Creating logical plan for 'SELECT EXTRACT(WEEK FROM to_timestamp('2020-09-08T12:00:00+00:00'))'
732-
// SQL(ParserError("Expected date/time field, found: WEEK"))'
733-
// will fix in sqlparser
734-
735-
// test_expression!(
736-
// "EXTRACT(WEEK FROM to_timestamp('2020-09-08T12:00:00+00:00'))",
737-
// "23"
738-
// );
730+
test_expression!(
731+
"EXTRACT(WEEK FROM to_timestamp('2020-09-08T12:00:00+00:00'))",
732+
"37"
733+
);
739734
test_expression!("date_part('DAY', CAST('2000-01-01' AS DATE))", "1");
740735
test_expression!(
741736
"EXTRACT(day FROM to_timestamp('2020-09-08T12:00:00+00:00'))",

0 commit comments

Comments
 (0)