Skip to content

Add vortex rewrite: re-encode a file with the current writer - #749

Merged
dfa1 merged 1 commit into
mainfrom
rewrite-command
Nov 13, 2026
Merged

dfa1 merged 1 commit into
mainfrom
rewrite-command

Conversation

@dfa1

@dfa1 dfa1 commented Nov 13, 2026

Copy link
Copy Markdown
Owner

vortex rewrite [--compact] <file|url> <out.vortex>. First version covers flat structs of primitive, bool and utf8 columns (nullable or not); other types fail before the output is created. Unit tests plus a vortex-jni cross-check (RewriteInteropIntegrationTest).

Not done: nested/decimal/binary/extension/f16 columns, --edition, and a faster path than boxed arrays for nullable columns.

🤖 Generated with Claude Code

`vortex rewrite [options] <file|url> <out.vortex>` scans every chunk of the
source and writes it again through VortexWriter, so the output is what
today's writer picks, not what the source's writer picked.

- Options: --compact, --no-zone-maps, --no-global-dict, --edition <id>
  (also --edition=<id>). An edition too old for the data fails with the
  writer guard's message.
- First version: a flat struct of primitive, bool and utf8 columns,
  nullable or not. Any other column (nested, decimal, binary, extension,
  f16) is rejected before the output exists. Nullable columns reach the
  writer as a primitive array plus validity (NullableData), utf8 as raw
  bytes.
- The output must not exist, so a rewrite cannot overwrite its source;
  any failure removes the partial output.
- Over HTTP each chunk prefetches all its columns together: the 105 MB
  OpenPowerlifting sample rewrites in 16 s from a URL instead of 51 s.
- docs/how-to.md has a Re-encode a Vortex file section; vortex-cli's
  version is managed in the root POM so the integration module can use it.

Cross-checked against vortex-jni: a jni-written file is rewritten, then jni
reads both back whole and under filters that prune zones.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@dfa1
dfa1 merged commit 3eb92dc into main Nov 13, 2026
11 of 12 checks passed
@dfa1
dfa1 deleted the rewrite-command branch November 13, 2026 20:57
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.

1 participant