Bonsai: Compiling Queries to Pruned Tree TraversalsDistinguished Paper
Trees can accelerate queries that search or aggregate values over large collections. They achieve this by storing metadata that enables quick pruning (or inclusion) of subtrees when predicates on that metadata can prove that none (or all) of the data in a subtree affect the query result. Existing systems implement this pruning logic manually for each query predicate and data structure. We generalize and mechanize this class of optimization. Our method derives conditions for when subtrees can be pruned (or included wholesale), expressed in terms of the metadata available at each node. We efficiently generate these conditions using symbolic interval analysis, extended with new rules to handle geometric predicates (e.g., intersection, containment). Additionally, our compiler fuses compound queries (e.g., reductions on filters) into a single tree traversal. These techniques enable the automatic derivation of generalized single-index and dual-index tree joins that support a wide class of join predicates beyond standard equality and range predicates. The generated traversals match the behavior of expert-written code that implements query-specific traversals, and can asymptotically outperform the linear scans and nested-loop joins that existing systems fall back to when hand-written cases do not apply.
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 | ||