Latest Results
feat: support `ST_DWithin` pushdown in vortex (#8625)
## Summary
<!--
Why are you proposing this change, and what is its impact?
Is it part of a long term effort, or a bigger change?
If this PR is related to a tracked effort or an open issue, please link
to the relevant issue.
-->
Insert non-throwing geo predicate `vortex_dwithin` in DuckDB, which
later pushdown into vortex, call `distance` scalar function on scanning,
significantly improve Q1/Q3 performance in SpatialBench.
## What changes are included in this PR?
<!--
No need to duplicate information from the previous section, but if
you're touching many
parts of the code base, its worth explicitly noting the important
changes or how they are tested.
-->
1. adding new geo predicate `vortex_dwithin` in DuckDB, which is
non-throwing and can be pushdown.
2. adding SQL rewrite so for geo native type, `ST_dwithin` is text
rewritten into `vortex_dwithin`.
<!--
Are there any user-facing changes that might require documentation
updates
Is any public API changed?
-->
## Performance
```
┏━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃ Query ┃ duckdb:parquet (base) ┃ duckdb:vortex ┃ duckdb:vortex-native ┃
┡━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
│ 1 │ 179.6ms │ 132.1ms (0.74x) │ 29.0ms (0.16x) │
│ 2 │ 268.1ms │ 255.3ms (0.95x) │ 312.5ms (1.17x) │
│ 3 │ 247.8ms │ 216.4ms (0.87x) │ 140.2ms (0.57x) │
│ 4 │ 199.6ms │ 146.9ms (0.74x) │ 144.5ms (0.72x) │
│ 5 │ 3.40s │ 3.43s (1.01x) │ 3.03s (0.89x) │
│ 6 │ 528.1ms │ 359.2ms (0.68x) │ 455.4ms (0.86x) │
│ 7 │ 984.0ms │ 983.2ms (1.00x) │ 887.7ms (0.90x) │
│ 8 │ 1.08s │ 945.4ms (0.87x) │ 997.6ms (0.92x) │
│ 9 │ 34.2ms │ 33.5ms (0.98x) │ 43.6ms (1.27x) │
└───────┴───────────────────────┴─────────────────┴──────────────────────┘
```
Takeaways: Q1 and Q3 is significantly improved due to the single table
geo predicate is pushdown into vortex scan. Q1 is more benefit from the
manually fast path without going through `geo` crate for calculation. Q3
is also potentially can be benefit from manually calculation.
---------
Signed-off-by: Nemo Yu <zyu379@wisc.edu> Latest Branches
+12%
+11%
+12%
claude/vortex-spark-bare-paths-bja1ek © 2026 CodSpeed Technology