Architecting a Query Compiler for Spatial Workloads
Ruby Y. Tahboub, Tiark Rompf
Abstract
Modern location-based applications rely extensively on the efficient processing of spatial data and queries. Spatial query engines are commonly engineered as an extension to a relational database or a cluster-computing framework. Large parts of the spatial processing runtime is spent on evaluating spatial predicates and traversing spatial indexing structures. Typical high-level implementations of these spatial structures incur significant interpretive overhead, which increases latency and lowers throughput. A promising idea to improve the performance of spatial workloads is to leverage native code generation techniques that have become popular in relational query engines. However, architecting a spatial query compiler is challenging since spatial processing has fundamentally different execution characteristics from relational workloads in terms of data dimensionality, indexing structures, and predicate evaluation.
In this paper, we discuss the underlying reasons why standard query compilation techniques are not fully effective when applied to spatial workloads, and we demonstrate how a particular style of query compilation based on techniques borrowed from partial evaluation and generative programming manages to avoid most of these difficulties by extending the scope of custom code generation into the data structures layer. We extend the LB2 main-memory query compiler, a relational engine developed in this style, with spatial data types, predicates, indexing structures, and operators. We show that the spatial extension matches the performance of specialized library code and outperforms relational and map-reduce extensions.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 307b66e0-d795-4236-92ad-db73500bf905Cited by top-tier papers3
- Babelfish: Efficient Execution of Polyglot QueriesPhilipp Marian Grulich, Steffen Zeuch, Volker MarklVLDB 2022 · 32 citations
- Compiling symbolic execution with staging and algebraic effectsGuannan Wei, Oliver Bracevac, Shangyin Tan, Tiark RompfOOPSLA 2020 · 12 citations
- Compilation of Shape Operators on Sparse ArraysAlexander J. Root, Bobby Yan, Peiming Liu, Christophe Gyurgyik et al.OOPSLA 2024 · 3 citations
Related papers
- SPADE: GPU-Powered Spatial Database Engine for Commodity HardwareHarish Doraiswamy, Juliana FreireICDE 2022 · 11 citations
- Adaptive Code Generation for Data-Intensive AnalyticsWangda Zhang, Junyoung Kim, Kenneth A. Ross, Eric Sedlar et al.VLDB 2021 · 12 citations
- Getting Swole: Generating Access-Aware Code with Predicate PullupsAndrew Crotty, Alex Galakatos, Tim KraskaICDE 2020 · 11 citations
- SOLAR: Scalable Distributed Spatial Joins Through Learning-Based OptimizationYongyi Liu, Ahmed Abdelmaguid, Ahmed R. Mahmood, Amr Magdy et al.ICDE 2026
- Designing an Open Framework for Query Optimization and CompilationMichael Jungmair, André Kohn, Jana GicevaVLDB 2022 · 45 citations
