Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ benchmarks/.out

# Scratch
*.vortex
!vortex-jni/goldenfiles/**/*.vortex
*.parquet
!docs/_static/example.parquet

Expand Down
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vortex-jni/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ vortex-spatial = { workspace = true }
[dev-dependencies]
jni = { workspace = true, features = ["invocation"] }
rstest = { workspace = true }
rstest_reuse = { workspace = true }
vortex-array = { workspace = true, features = ["_test-harness"] }

[lib]
crate-type = ["cdylib"]
Expand Down
34 changes: 34 additions & 0 deletions vortex-jni/goldenfiles/list_layout/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# List layout golden files

Files written with `vortex.listLayout`, in the `qc2026.11.0` edition, which holds only the
`vortex.list` layout. It freezes in 0.91.0; from then on, every later build must read these files.
`src/list_layout_golden.rs` checks two things on every build:

- **Reads:** each file still reads back to the values it was written from.
- **Writes:** today's writer still writes the same list layouts as each file.

Upstream makes no such promise, since it keeps the list layout in its `unstable` edition. These
files are how we find out when a merge changes it.

## When a test fails

A failure means the format changed: either old files no longer read, or new files differ from
old ones and older readers may not read them. Don't merge the change as it is.

- **A read fails:** keep reading the old format, for example by keeping its reader under the
old wire id (layouts can read more than one).
- **Only the write check fails:** the writer changed what it writes. Make it write the old format
again, or treat the new format as a new edition that readers must know first.

**Never regenerate a file to make a test pass.** That throws away the only record of what old
files look like.

## Adding a case

Add it to `Case` in `src/list_layout_golden.rs`, then write the files that are missing:

```sh
cargo test -p vortex-jni --lib list_layout_golden::write_missing_golden_files -- --ignored
```

It only writes files that don't exist yet. Commit the new file.
Binary file not shown.
Binary file not shown.
Binary file added vortex-jni/goldenfiles/list_layout/nested.vortex
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added vortex-jni/goldenfiles/list_layout/utf8.vortex
Binary file not shown.
2 changes: 2 additions & 0 deletions vortex-jni/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ mod errors;
mod expression;
mod file;
mod io;
#[cfg(test)]
mod list_layout_golden;
mod logging;
mod object_store;
mod runtime;
Expand Down
Loading
Loading