rambleraptor commented on code in PR #3547:
URL: https://github.com/apache/iceberg-python/pull/3547#discussion_r3449899348
##########
tests/expressions/test_evaluator.py:
##########
@@ -1198,6 +1240,50 @@ def test_strict_not_nan(strict_data_file_schema: Schema,
strict_data_file_1: Dat
assert not should_read, "Should not match: null values are not nan"
[email protected]("field_type", [FloatType(), DoubleType()])
+def
test_strict_not_equal_and_not_in_with_mixed_nans_and_matching_bounds(field_type:
PrimitiveType) -> None:
+ schema = Schema(NestedField(1, "x", field_type, required=False))
+ data_file = DataFile.from_args(
+ file_path="file.parquet",
+ file_format=FileFormat.PARQUET,
+ partition={},
+ record_count=2,
+ file_size_in_bytes=1,
+ value_counts={1: 2},
+ null_value_counts={1: 0},
+ nan_value_counts={1: 1},
+ lower_bounds={1: to_bytes(field_type, 5.0)},
+ upper_bounds={1: to_bytes(field_type, 5.0)},
+ )
+
+ should_read = _StrictMetricsEvaluator(schema, NotEqualTo("x",
5.0)).eval(data_file)
Review Comment:
Weird, my comments didn't show up in the right place? Anyways, you wrote out
some really useful explanations here and we should have these as code comments.
--
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]