kevinjqliu commented on code in PR #1542: URL: https://github.com/apache/iceberg-python/pull/1542#discussion_r1922894009
########## tests/integration/test_reads.py: ########## @@ -950,3 +951,11 @@ def test_read_from_s3_and_local_fs(catalog: Catalog, tmp_path: PosixPath) -> Non result_table = tbl.scan().to_arrow() assert result_table["colA"].to_pylist() == ["one", "one"] + + +@pytest.mark.integration +@pytest.mark.parametrize("catalog", [pytest.lazy_fixture("session_catalog_hive"), pytest.lazy_fixture("session_catalog")]) +def test_scan_with_datetime(catalog: Catalog) -> None: + table = create_table(catalog) + # test that this doesn't raise an exception... + table.scan(row_filter=GreaterThanOrEqual("datetime", datetime.now())).to_pandas() Review Comment: nit: the [table has `datetime` column](https://github.com/apache/iceberg-python/blob/8af4ca13e803122d4cd5a42517df5bcd06998ccf/tests/integration/test_reads.py#L68-L81), what if we add a row and then filter datetime before and after and assert the results. maybe something like, ``` yesterday = ... table.append({"datatime": yesterday) assert len(table.scan(row_filter=GreaterThanOrEqual("datetime", datetime.now()))) == 0 assert len(table.scan(row_filter=LessThanOrEqual("datetime", datetime.now()))) == 1 ``` -- 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