rdblue commented on code in PR #5303:
URL: https://github.com/apache/iceberg/pull/5303#discussion_r978162614
##########
python/tests/expressions/test_expressions_base.py:
##########
@@ -841,3 +924,290 @@ def test_not_expression_binding(unbound_not_expression,
expected_bound_expressio
"""Test that visiting an unbound NOT expression with a bind-visitor
returns the expected bound expression"""
bound_expression = base.visit(unbound_not_expression,
visitor=base.BindVisitor(schema=table_schema_simple))
assert bound_expression == expected_bound_expression
+
+
+def test_bound_boolean_expression_visitor_ignore_is_nan_for_string_type():
+ """Test ignoring IsNan expressions when the field type is a String"""
Review Comment:
Okay, I looked at what's happening here and it is a bit misleading because
we are rewriting expressions in the expression constructors. `BoundIsNaN(...)`
actually returns `AlwaysFalse()` because it cannot be true for a string. Then
`Not(AlwaysFalse())` returns `AlwaysTrue()` and `And` returns its left argument
because the right argument is a constant.
In the end, this is testing expression construction that simplifies
automatically, not the visitor. I'm going to just remove this test since it
looks like everything functions properly.
--
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]