Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ public void testNotEqWithSingleValue() {
10,
ImmutableMap.of(3, 10L),
ImmutableMap.of(3, 0L),
ImmutableMap.of(3, 0L),
null,
ImmutableMap.of(3, toByteBuffer(StringType.get(), "aaa")),
ImmutableMap.of(3, toByteBuffer(StringType.get(), "zzz")));

Expand Down Expand Up @@ -1060,14 +1060,14 @@ public void testNotEqWithSingleValue() {
"single_value_nulls.avro",
Row.of(),
10,
ImmutableMap.of(3, 10L),
ImmutableMap.of(3, 2L),
ImmutableMap.of(14, 10L),
ImmutableMap.of(14, 2L),
null,
ImmutableMap.of(3, toByteBuffer(StringType.get(), "abc")),
ImmutableMap.of(3, toByteBuffer(StringType.get(), "abc")));
ImmutableMap.of(14, toByteBuffer(StringType.get(), "abc")),
ImmutableMap.of(14, toByteBuffer(StringType.get(), "abc")));

shouldRead =
new InclusiveMetricsEvaluator(SCHEMA, notEqual("required", "abc"))
new InclusiveMetricsEvaluator(SCHEMA, notEqual("some_empty", "abc"))
.eval(singleValueWithNulls);
assertThat(shouldRead).as("Should read: file has nulls which match != predicate").isTrue();

Expand Down Expand Up @@ -1111,7 +1111,7 @@ public void testNotInWithSingleValue() {
10,
ImmutableMap.of(3, 10L),
ImmutableMap.of(3, 0L),
ImmutableMap.of(3, 0L),
null,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this and the other places were reporting NaN counts for a string column

ImmutableMap.of(3, toByteBuffer(StringType.get(), "aaa")),
ImmutableMap.of(3, toByteBuffer(StringType.get(), "zzz")));

Expand All @@ -1128,7 +1128,7 @@ public void testNotInWithSingleValue() {
10,
ImmutableMap.of(3, 10L),
ImmutableMap.of(3, 0L),
ImmutableMap.of(3, 0L),
null,
ImmutableMap.of(3, toByteBuffer(StringType.get(), "abc")),
ImmutableMap.of(3, toByteBuffer(StringType.get(), "abc")));

Expand All @@ -1151,14 +1151,14 @@ public void testNotInWithSingleValue() {
"single_value_nulls.avro",
Row.of(),
10,
ImmutableMap.of(3, 10L),
ImmutableMap.of(3, 2L),
ImmutableMap.of(3, 0L),
ImmutableMap.of(3, toByteBuffer(StringType.get(), "abc")),
ImmutableMap.of(3, toByteBuffer(StringType.get(), "abc")));
ImmutableMap.of(14, 10L),
ImmutableMap.of(14, 2L),
null,
ImmutableMap.of(14, toByteBuffer(StringType.get(), "abc")),
ImmutableMap.of(14, toByteBuffer(StringType.get(), "abc")));

shouldRead =
new InclusiveMetricsEvaluator(SCHEMA, notIn("required", "abc", "def"))
new InclusiveMetricsEvaluator(SCHEMA, notIn("some_empty", "abc", "def"))
.eval(singleValueWithNulls);
assertThat(shouldRead).as("Should read: file has nulls which match NOT IN predicate").isTrue();

Expand Down
Loading