Skip to content

API: Fix null/Nan counts in evaluator test - #17419

Merged
amogh-jahagirdar merged 2 commits into
apache:mainfrom
nastra:required-column-null-counts
Jul 30, 2026
Merged

API: Fix null/Nan counts in evaluator test#17419
amogh-jahagirdar merged 2 commits into
apache:mainfrom
nastra:required-column-null-counts

Conversation

@nastra

@nastra nastra commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

The single_value_nulls fixtures in testNotEqWithSingleValue and testNotInWithSingleValue reported 2 nulls for field 3, the "required" column. A required column cannot contain nulls, so no writer produces those metrics. Move both to the optional "some_empty" column, which keeps the case the tests cover: a file whose bounds hold a single value still has to be read when the column also contains nulls, because those nulls match != and NOT IN.

The NOT IN fixture also reported a NaN count for a string column, which only float and double columns track.

  • Model: Claude Opus 5
  • Platform/Tool: Cursor
  • Human Oversight: fully reviewed
  • Prompt Summary: While reviewing Core: Add content stats evaluator #17413, identify a test fixture that reports
    metrics no writer can produce, and fix it on a separate branch off main.

The single_value_nulls fixtures in testNotEqWithSingleValue and
testNotInWithSingleValue reported 2 nulls for field 3, the "required"
column. A required column cannot contain nulls, so no writer produces
those metrics. Move both to the optional "some_empty" column,
which keeps the case the tests cover: a file whose bounds hold a single
value still has to be read when the column also contains nulls, because
those nulls match != and NOT IN.

The NOT IN fixture also reported a NaN count for a string column, which
only float and double columns track.
The range_of_values and single_value fixtures reported a NaN count for
field 3, a string column. Only float and double columns track NaN counts,
which is why the single_value fixture in testNotEqWithSingleValue already
passed null for them.

Generated-by: Cursor
@nastra nastra changed the title API: Fix null counts on a required column in evaluator test API: Fix null/Nan counts in evaluator test Jul 29, 2026
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

@anoopj anoopj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

change looks correct to me.

@amogh-jahagirdar amogh-jahagirdar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 to fixing these tests to represent realistic situations. Even though it's testing a different abstraction where it doesn't matter, it's best to have these cases be representative as possible.

@amogh-jahagirdar
amogh-jahagirdar merged commit 9c59be1 into apache:main Jul 30, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants