docs(java): replace the Java API example that no longer compiles - #9635
Conversation
The example imported dev.vortex.api.File and dev.vortex.api.Array, both removed in vortex-data#7527. The page predates that removal and offers no pointer to the API that replaced them, so the first thing a JNI user copies fails to compile. Rewritten around the read path that exists today: Session, DataSource.open, scan, and Partition.scanArrow, following the loop the vortex-jni tests use. Signed-off-by: jackylee <qcsd2011@gmail.com>
Merging this PR will improve performance by 33.22%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | arrow_checked_add_u32_neon[16384] |
20.4 µs | 12.3 µs | +65.35% |
| ⚡ | WallTime | arrow_checked_add_u32_avx512[16384] |
21.3 µs | 17.6 µs | +20.78% |
| ⚡ | Simulation | take[duplicates/repeated/primitive/nonnull/chunks=16/indices=1000] |
245 µs | 207 µs | +18.39% |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing jackylee-ch:java-api-docs-example (961d17f) with develop (ee1ac25)
Footnotes
-
106 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. ↩
-
4 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them. ↩
The only Java example on the docs site cannot compile:
dev.vortex.api.Fileanddev.vortex.api.Arraywere removed in #7527, and the page has not been touched since. Nothing init points at the API that replaced them.
Replaced with the read path that exists today —
Session→DataSource.open→scan→Partition.scanArrow— following the same loop the JNI tests use.Tests
Compiled both snippets as a scratch class under
vortex-jni/src/test: the published one fails withfive
cannot find symbolerrors forFileandArray, the new one compiles.make -C docs htmlsucceeds under the repo's
--fail-on-warning.AI assistance
Written with agentic AI assistance; I compiled the replacement snippet before publishing it.