rdblue commented on code in PR #6247:
URL: https://github.com/apache/iceberg/pull/6247#discussion_r1032835835


##########
python/tests/expressions/test_visitors.py:
##########
@@ -1429,3 +1432,162 @@ def test_rewrite_bound():
             accessor=Accessor(position=0, inner=None),
         )
     )
+
+
[email protected]
+def spec() -> PartitionSpec:
+    return PartitionSpec(PartitionField(1, 1000, IdentityTransform(), "id"))
+
+
+def test_identity_projection(schema: Schema, spec: PartitionSpec):
+    predicates = [
+        NotNull("id"),
+        IsNull("id"),
+        LessThan("id", 100),
+        LessThanOrEqual("id", 101),
+        GreaterThan("id", 102),
+        GreaterThanOrEqual("id", 103),
+        EqualTo("id", 104),
+        NotEqualTo("id", 105),
+    ]
+
+    expected = [
+        BoundNotNull(
+            term=BoundReference[int](
+                field=NestedField(field_id=1000, name="id", 
field_type=IntegerType(), required=False),

Review Comment:
   Why return bound predicates? That makes testing harder because you have to 
specify all of the binding, plus it prevents people using the predicates from 
selecting just the needed partition fields and binding to that selected 
partition type.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to