alamb opened a new issue, #8452: URL: https://github.com/apache/arrow-datafusion/issues/8452
### Describe the bug Some timestamps that should error are actally parsed, leading to confusing cases when users make a mistake For example this timestamp is invalid `'2023-12-05T21:58:10.45ZZTOP'` but it is parsed as though it were `'2023-12-05T21:58:10.45Z'` (the trailing content is ignored) ### To Reproduce using `datafusion-cli`, ```sql ❯ select TIMESTAMP '2023-12-05T21:58:10.45ZZTOP'; +-------------------------------------+ | Utf8("2023-12-05T21:58:10.45ZZTOP") | +-------------------------------------+ | 2023-12-05T21:58:10.450 | +-------------------------------------+ 1 row in set. Query took 0.001 seconds. ``` ### Expected behavior I expect the query to error, similarly to what happens if the `Z` is not present ``` ❯ select TIMESTAMP '2023-12-05T21:58:10.45 hello'; Optimizer rule 'simplify_expressions' failed caused by Arrow error: Parser error: Invalid timezone "hello": 'hello' is not a valid timezone ``` This is consistent with postgres, which errors for such cases: ```sql ### Additional context Kudos to @reidkaufmann for finding this downstream -- 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...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org