Skip to content

feat(spark): let VortexOutputWriter store footer metadata - #11137

Merged
robert3005 merged 2 commits into
vortex-data:developfrom
quantcast:cwirt/upstream-spark-writer-footer-metadata
Nov 6, 2026
Merged

robert3005 merged 2 commits into
vortex-data:developfrom
quantcast:cwirt/upstream-spark-writer-footer-metadata

Conversation

@ChristopherWirt

Copy link
Copy Markdown
Contributor

Summary

VortexWriter.Builder can store user metadata segments in the file footer, but VortexOutputWriter doesn't expose this. A caller writing files from Spark outside the commit protocol has to keep its own copy of the writer just to set footer keys.

This adds a VortexOutputWriter constructor that takes footer metadata.

Changes

  • New constructor VortexOutputWriter(filePath, schema, options, writable, metadata), which passes metadata to VortexWriter.Builder.metadata.
  • The existing constructor delegates with an empty map, so Spark's write path is unchanged.

Tests

  • VortexOutputWriterTest.storesFooterMetadata writes a file with one metadata key and reads it back with NativeFiles.readMetadata.

On the fork (quantcast#77, same change), the Java changes are the same. develop's VortexOutputWriter differs around the builder call, so this branch reapplies the change by hand. Only git diff --check has been run on the port.

API Changes

  • New public VortexOutputWriter constructor taking Map<String, byte[]> metadata. Existing callers are unaffected.

AI assistance

Disclosed per the AI policy: AI tools helped write and review this change. Claude Code prepared this upstream port, issue and PR description at my request. I am the responsible contributor.

🤖 Generated with Claude Code

@robert3005 robert3005 added the changelog/feature A new feature label Nov 3, 2026
@robert3005
robert3005 enabled auto-merge (squash) November 3, 2026 21:04
Adds a VortexOutputWriter constructor that takes footer metadata segments
and passes them to the JNI writer builder, so callers writing files outside
Spark's commit protocol can record their own metadata without a custom writer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Christopher Wirt <cwirt@quantcast.com>
auto-merge was automatically disabled November 4, 2026 07:59

Head branch was pushed to by a user without write access

@ChristopherWirt
ChristopherWirt force-pushed the cwirt/upstream-spark-writer-footer-metadata branch from 9d6f4c8 to 5e30b68 Compare November 4, 2026 07:59
@robert3005
robert3005 enabled auto-merge (squash) November 6, 2026 11:17
@codspeed

codspeed Bot commented Nov 6, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 11.13%

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

❌ 1 regressed benchmark
✅ 1916 untouched benchmarks
⏩ 47 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime lt_i64_nullable_avx2 9 µs 10.2 µs -11.13%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing quantcast:cwirt/upstream-spark-writer-footer-metadata (0a2d05a) with develop (69ab721)

Open in CodSpeed

Footnotes

  1. 47 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@robert3005
robert3005 merged commit 7415992 into vortex-data:develop Nov 6, 2026
68 of 69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants