Skip to content

test: pin list layouts nested in structs and check that leaves inside lists read alone - #89

Merged
ChristopherWirt merged 1 commit into
developfrom
rasheed/list-pruning-bid-shape
Nov 5, 2026
Merged

ChristopherWirt merged 1 commit into
developfrom
rasheed/list-pruning-bid-shape

Conversation

@gitRasheed

Copy link
Copy Markdown
Collaborator

Summary

Closes #88. The list layout golden files pinned lists one or two deep. This adds the deeper shape wide event
schemas write, and a Spark test that leaves inside those lists are read without their siblings.

Changes

  • Three golden cases in vortex-jni/goldenfiles/list_layout/:
    • event_shape: a nullable struct holding nullable lists of nullable structs, which hold a nullable struct with
      its own list, a list of strings, and lists nested four deep. Every struct has a string sibling.
    • nullable_struct_elements: nullable lists of nullable structs.
    • zero_row_chunks: nullable lists written as one stream of populated chunks with empty chunks before, between
      and after them.
  • Projections read leaves from event_shape one, two and four lists deep, below a struct, and a list of strings.
  • VortexListElementPruningIoTest: a table of that shape with eight wide string siblings per struct, written with
    and without vortex.listLayout and as Parquet. For leaves one to four lists deep it checks, through V1 and V2,
    that the list layout reads under a fifth of the bytes of the list around the leaf, and that results match Parquet
    with nested schema pruning on and off. Filters on list fields are covered too.

Testing

  • cargo test -p vortex-jni --lib list_layout_golden: 77 passed (52 before).

  • Writing i64 offsets fails the write check of all 10 cases, including the 3 new ones.

  • VortexListElementPruningIoTest on Spark 4.0 and 3.5: 14 passed each. Bytes read, list layout, either path:

    Leaf Leaf List around it Without the list layout
    1 list 53 to 55 KB 22.0 MB 21.9 MB
    2 lists 74 KB 3.1 MB 21.9 MB
    3 lists 133 to 148 KB 11.5 MB 21.9 MB
    4 lists 158 to 159 KB 3.5 MB 21.9 MB
  • cargo clippy -p vortex-jni --all-targets --all-features -- -D warnings, cargo +nightly fmt, spotlessApply.

… lists read alone

- Golden files for three more list layouts: a nullable struct holding lists of nullable structs four lists
  deep, nullable lists of nullable structs, and lists written with empty chunks before, between and after
  populated ones. Projections read leaves one to four lists deep from them.
- A Spark test reads leaves one to four lists deep, under structs, through both read paths, and checks each
  reads under a fifth of the bytes of the list around it, and matches Parquet with pruning on and off.

Signed-off-by: gitRasheed <99349713+gitRasheed@users.noreply.github.com>

@ChristopherWirt ChristopherWirt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the changes against #88 and found no blocking issues.

The three additional golden files extend the existing read and writer-layout checks without replacing existing fixtures. The new cases cover nullable struct elements, four nested list levels below nullable structs, and empty chunks around populated input chunks. Projection scans are materialized and compared with the in-memory arrays.

The Spark tests force decoding with a hash aggregate, count Hadoop reads through the existing counting filesystem, compare each leaf against its surrounding list, and check results against Parquet through both V1 and V2 with pruning enabled and disabled. The wide sibling fields make the I/O assertions meaningful.

The current Linux musl CI check passed. I did not rerun tests locally; the additional targeted Rust/Spark runs and mutation check are reported in the PR description.

@ChristopherWirt
ChristopherWirt merged commit 01c4e15 into develop Nov 5, 2026
1 check passed
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.

Pin and test list layouts nested in structs, as wide event schemas write them

2 participants