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

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 8.19%

⚠️ 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.

⚡ 2 improved benchmarks
❌ 3 regressed benchmarks
✅ 214 untouched benchmarks
⏩ 2252 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
words_gather_dispatch_avx512[1024] 9 ns 13 ns -30.77%
lanezip_checked_add_u32_avx2[16384] 5.3 µs 6.2 µs -13.96%
dbp_split_kernel_mixed_null_neon[(I256, 1024)] 1.9 µs 2.2 µs -11.65%
filtered_sink_i64_avx2[OneNullInEight] 26.1 µs 23.2 µs +12.6%
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. 2252 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.

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.

2 participants