rdblue commented on code in PR #6141: URL: https://github.com/apache/iceberg/pull/6141#discussion_r1022106643
########## python/tests/expressions/test_literals.py: ########## @@ -312,12 +320,16 @@ def test_string_to_timestamp_literal(): def test_timestamp_with_zone_without_zone_in_literal(): timestamp_str = literal("2017-08-18T14:21:01.919234") - assert timestamp_str.to(TimestamptzType()) is None + with pytest.raises(ValueError) as e: + _ = timestamp_str.to(timestamp_str.to(TimestamptzType())) + assert "Invalid timestamp with zone: 2017-08-18T14:21:01.919234 (must be ISO-8601)" in str(e.value) def test_timestamp_without_zone_with_zone_in_literal(): timestamp_str = literal("2017-08-18T14:21:01.919234+07:00") - assert timestamp_str.to(TimestampType()) is None + with pytest.raises(ValueError) as e: + _ = timestamp_str.to(TimestampType()) + assert "Could not convert 2017-08-18T14:21:01.919234+07:00 into a timestamp" in str(e.value) Review Comment: Similar, nice to state that it had a zone offset but should not have. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org