From 6ac14f5f3e176f57437e0b8f97ce7988c89e49c5 Mon Sep 17 00:00:00 2001 From: Sammy Sidhu Date: Thu, 21 Dec 2023 15:31:06 -0800 Subject: [PATCH] add more tests --- .../iceberg/test_partition_pruning.py | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/tests/integration/iceberg/test_partition_pruning.py b/tests/integration/iceberg/test_partition_pruning.py index b36c49cc4e..2865858ddc 100644 --- a/tests/integration/iceberg/test_partition_pruning.py +++ b/tests/integration/iceberg/test_partition_pruning.py @@ -36,7 +36,10 @@ def test_daft_iceberg_table_predicate_pushdown_days(local_iceberg_catalog): lambda x: x == date(2023, 3, 6), lambda x: x > date(2023, 3, 6), lambda x: x != date(2023, 3, 6), - lambda x: x == date(2022, 3, 6), + lambda x: date(2023, 3, 6) > x, + lambda x: date(2023, 3, 6) == x, + lambda x: date(2023, 3, 6) < x, + lambda x: date(2023, 3, 6) != x, ], [ "test_partitioned_by_months", @@ -70,7 +73,10 @@ def test_daft_iceberg_table_predicate_pushdown_on_date_column(predicate, table, lambda x: x == datetime(2023, 3, 6, tzinfo=pytz.utc), lambda x: x > datetime(2023, 3, 6, tzinfo=pytz.utc), lambda x: x != datetime(2023, 3, 6, tzinfo=pytz.utc), - lambda x: x == datetime(2022, 3, 6, tzinfo=pytz.utc), + lambda x: datetime(2023, 3, 6, tzinfo=pytz.utc) > x, + lambda x: datetime(2023, 3, 6, tzinfo=pytz.utc) == x, + lambda x: datetime(2023, 3, 6, tzinfo=pytz.utc) < x, + lambda x: datetime(2023, 3, 6, tzinfo=pytz.utc) != x, ], [ "test_partitioned_by_days", @@ -107,6 +113,11 @@ def test_daft_iceberg_table_predicate_pushdown_on_timestamp_column(predicate, ta lambda x: x > "d", lambda x: x != "d", lambda x: x == "z", + lambda x: "d" > x, + lambda x: "d" == x, + lambda x: "d" < x, + lambda x: "d" != x, + lambda x: "z" == x, ], [ "test_partitioned_by_truncate", @@ -140,7 +151,12 @@ def test_daft_iceberg_table_predicate_pushdown_on_letter(predicate, table, limit lambda x: x == 4, lambda x: x > 4, lambda x: x != 4, - lambda x: x == 4, + lambda x: x == 100, + lambda x: 4 > x, + lambda x: 4 == x, + lambda x: 4 < x, + lambda x: 4 != x, + lambda x: 100 == x, ], [ "test_partitioned_by_bucket",