We describe a comprehensive compilation approach for relational algebra, centered on an abstract loop-based intermediate representation (IR) that can express fused implementations of relational algebra operators on both sets and multisets. The loops are abstracted away from physical data structures thus making it easier to optimize. We show how to lower relational algebra query plan trees to the IR, including the complex operators that are used in production database systems, such as outer joins, non-equi joins, and differences. We then show how to compile this IR to efficient C++ code that co-iterates over the physical data structures present in relational algebra expressions. Finally, we show that our approach is portable across data structures. Since our approach can fuse across disparate operators, it achieves a 3.8x speedup (0.8–12.1x) compared to Hyper on selected LSQB benchmarks and worst-case optimal triangle queries. Our compiler also generates code of high quality: it has similar sequential performance to Hyper on TPC-H with a 1.0x speedup (0.4–4.3x) and is approaching their parallel performance with a 0.6x speedup (0.2–1.8x).
Fri 19 JunDisplayed time zone: Mountain Time (US & Canada) change
16:10 - 17:30 | Optimization of Data PipelinesPLDI Research Papers at Flatirons 2 Chair(s): Pavel Panchekha University of Utah | ||
16:10 20mTalk | [SIGPLAN OOPSLA’25] Homomorphism Calculus for User-Defined Aggregations PLDI Research Papers Ziteng Wang University of Texas at Austin, Ruijie Fang University of Texas at Austin, Linus Zheng University of Texas at Austin, Dixin Tang University of Texas at Austin, Işıl Dillig University of Texas at Austin | ||
16:30 20mTalk | Bonsai: Compiling Queries to Pruned Tree TraversalsDistinguished Paper PLDI Research Papers Alexander J Root Stanford University, Christophe Gyurgyik Stanford University, Purvi Goel Stanford University, Kayvon Fatahalian Stanford University, Jonathan Ragan-Kelley Massachusetts Institute of Technology, Andrew Adams Adobe Research, Fredrik Kjolstad Stanford University DOI Pre-print | ||
16:50 20mTalk | A Compiler for Fused Relational Operations on Multisets PLDI Research Papers DOI | ||
17:10 20mTalk | Optimal Predicate Pushdown Synthesis PLDI Research Papers Robert Zhang University of Texas at Austin, Eric Hayden Campbell University of Texas at Austin, Dixin Tang University of Texas at Austin, Işıl Dillig University of Texas at Austin DOI | ||