Skip to content

test(spark): check struct nulls through the pruned read - #32

Merged
ChristopherWirt merged 1 commit into
developfrom
cwirt/spark-pruned-isnull-tests
Oct 29, 2026
Merged

ChristopherWirt merged 1 commit into
developfrom
cwirt/spark-pruned-isnull-tests

Conversation

@ChristopherWirt

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #10, from its code review.

The IS NULL checks in VortexNestedSchemaPruningTest never exercised the pruned read. On its own, n IS NULL makes Spark read the whole n, so dropping struct nulls in the pruned projection went unnoticed.

Changes

  • The null checks are now selected next to a pruned field, so Spark reads the pruned struct.
  • Each test asserts the read schema, so the test fails if Spark stops pruning it.

Checked by removing the mask in NestedSchemaPruning: nullableStructInStructField now fails, where before no test did.

Tested with:

  • ./gradlew spotlessCheck :vortex-spark_2.13:test :vortex-spark_2.12:test: all pass

🤖 Generated with Claude Code

The null checks in VortexNestedSchemaPruningTest selected IS NULL on its
own, so Spark read the whole struct and never exercised the pruned
projection. Select the null checks next to a pruned field, so the scan
reads the pruned struct, and assert the read schema to keep it that way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Christopher Wirt <[email protected]>
@ChristopherWirt
ChristopherWirt merged commit a60e59d into develop Oct 29, 2026
1 check passed
@gitRasheed
gitRasheed deleted the cwirt/spark-pruned-isnull-tests branch October 30, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants