rdblue commented on code in PR #6140:
URL: https://github.com/apache/iceberg/pull/6140#discussion_r1017243615
##########
python/tests/expressions/test_visitors.py:
##########
@@ -1614,27 +1342,14 @@ def test_manifest_evaluator_and():
upper_bound=_to_byte_buffer(LongType(), 10),
)
)
- assert _create_manifest_evaluator(expr).eval(manifest)
+ assert _ManifestEvalVisitor(long_schema, expr).eval(manifest)
-def test_manifest_evaluator_or():
+def test_manifest_evaluator_or(long_schema: Schema):
expr = Or(
- BoundIn(
- term=BoundReference(
- field=NestedField(field_id=1, name="foo",
field_type=LongType(), required=False),
- accessor=Accessor(position=0, inner=None),
- ),
- literals={LongLiteral(i) for i in range(22)},
- ),
- BoundIn(
- term=BoundReference(
- field=NestedField(field_id=1, name="foo",
field_type=LongType(), required=False),
- accessor=Accessor(position=0, inner=None),
- ),
- literals={LongLiteral(i) for i in range(22)},
- ),
+ In(Reference[int]("col_long"), tuple({LongLiteral(i) for i in
range(22)})),
+ In(Reference[int]("col_long"), tuple({LongLiteral(i) for i in
range(22)})),
Review Comment:
I would expect an `Or` test to use different expressions, like
`Or(LessThan("id", 5), GreaterThan("id", 10)`. It seems weird to have the same
expression twice.
--
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]