Skip to content

feat: expose Spark scan schema and pushed predicates - #9956

Open
xiaoh1024 wants to merge 3 commits into
vortex-data:developfrom
xiaoh1024:feat/spark-native-scan-descriptor
Open

xiaoh1024 wants to merge 3 commits into
vortex-data:developfrom
xiaoh1024:feat/spark-native-scan-descriptor

Conversation

@xiaoh1024

Copy link
Copy Markdown
Contributor

Summary

Expose the scan metadata needed by alternative execution engines, such as Comet, to preserve filter semantics when replacing the Vortex Spark reader.

Spark may remove filters fully handled by Vortex and prune predicate-only columns from the scan output. The replacement reader therefore needs both the full table schema and the predicates the scan has accepted.

Changes

  • Add VortexScan.tableSchema() to expose the schema before projection pushdown.
  • Add VortexScan.pushedPredicates() to return a defensive copy of the accepted predicates. Document that replacement readers must enforce every predicate or retain the original reader.
  • Add tests covering metadata preservation through filter pushdown, empty projection and scan construction, as well as defensive array copying.

Testing

  • VortexScanTest: 2 tests passed on Spark 3.5.9 / Scala 2.12.
  • VortexScanTest: 2 tests passed on Spark 4.1.2 / Scala 2.13.
  • Java formatting checks passed.

AI Assistance

AI tools assisted with implementation, tests* and drafting this PR description.

@robert3005

Copy link
Copy Markdown
Contributor

Just fyi I am working on #9658 which should simplify all of it

@robert3005
robert3005 enabled auto-merge (squash) September 21, 2026 21:10
@robert3005 robert3005 added the changelog/feature A new feature label Sep 21, 2026
@codspeed

codspeed Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 9.3%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 3 improved benchmarks
❌ 5 regressed benchmarks
✅ 1097 untouched benchmarks
⏩ 1366 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Simulation decode_primitives[f32, (1000, 512)] 42 µs 64.8 µs -35.09%
❌ WallTime words_gather_dispatch_avx512[1024] 9 ns 13 ns -30.77%
❌ Simulation random_i16[0.95] 81.5 µs 99.8 µs -18.36%
❌ WallTime lanezip_checked_add_u32_avx2[16384] 5.3 µs 6.2 µs -13.96%
❌ WallTime dbp_split_kernel_mixed_null_neon[(I256, 1024)] 1.9 µs 2.2 µs -11.65%
⚡ Simulation random_i8[0.5] 96 µs 72.4 µs +32.5%
⚡ WallTime filtered_sink_i64_avx2[OneNullInEight] 26.1 µs 23.2 µs +12.6%
⚡ WallTime mul_u32_nonnull_avx512 6.2 µs 5.6 µs +10.11%

Tip

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


Comparing xiaoh1024:feat/spark-native-scan-descriptor (6ab7fcf) with develop (895935e)

Open in CodSpeed

Footnotes

  1. 1366 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. ↩

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

This PR has been marked as stale because it has been open for 14 days with no activity. Please comment or remove the stale label if you wish to keep it active, otherwise it will be closed in 7 days

@github-actions github-actions Bot added the stale This PR is stale and will be auto-closed soon label Oct 6, 2026
@joseph-isaacs joseph-isaacs removed the stale This PR is stale and will be auto-closed soon label Oct 6, 2026

This branch has not been deployed

No deployments
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.

3 participants