iffyio commented on code in PR #1971: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1971#discussion_r2226209387
########## tests/sqlparser_bigquery.rs: ########## @@ -2566,3 +2566,101 @@ fn test_struct_trailing_and_nested_bracket() { ) ); } + +#[test] +fn test_datetime_granularity() { + let stmt = bigquery().verified_stmt(concat!( + "SELECT ", + "DATE_TRUNC(CURRENT_DATE, DAY), ", + "DATE_TRUNC(CURRENT_DATE, WEEK(MONDAY)) ", + "FROM my_table", + )); Review Comment: double checking the intent of the changes: my understanding is that currently given `SELECT DATE_TRUNC(CURRENT_DATE, WEEK(MONDAY)`, `WEEK(MONDAY)` should be parsed as a function with name `WEEK` and having a single identifier `MONDAY` as argument? Is that indeed the case (vs e.g the parser not being able to handle such a statement) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org