Equipping query processing systems with provable theoretical guarantees has been a central focus at the intersection of database theory and systems in recent years. However, the divergence between theoretical abstractions and system assumptions creates a gap between an algorithm's high-level logical specification and its low-level physical implementation. Ensuring the correctness of this logical-to-physical translation is crucial for realizing theoretical optimality as practical performance gains. Existing database testing frameworks struggle to address this need because necessary algorithm-specific inputs such as join trees are absent from standard test case generation, and integrating complex algorithms into these frameworks imposes prohibitive engineering overhead. Fallback solutions, such as using macro-benchmark queries, are inherently too noisy for isolating intricate defects during this translation. In this experience paper, we present a retrospective analysis of $\mathsf{CODA}$, a computer-orchestrated testing framework utilized during the physical co-design of TreeTracker Join ($\mathsf{TTJ}$), a theoretically optimal yet practical join algorithm recently published in ACM TODS. By synthesizing minimal reproducible examples, $\mathsf{CODA}$ successfully isolates subtle translation defects, such as state mismanagement and mapping conflicts between join trees and bushy plans. We demonstrate that this logical-to-physical translation process is a bidirectional feedback loop: early structural testing not only hardened $\mathsf{TTJ}$'s physical implementation but also exposed a boundary condition that directly refined the formal precondition of $\mathsf{TTJ}$ itself. Finally, we detail how confronting these translation challenges drove the architectural evolution of $\mathsf{CODA}$ into a robust, structure-aware test generation pipeline for join-tree-dependent algorithms.
翻译:近年来,为查询处理系统提供可证明的理论保证一直是数据库理论与系统交叉领域的核心焦点。然而,理论抽象与系统假设之间的分歧造成了算法的高层逻辑规约与低层物理实现之间的鸿沟。确保这种逻辑到物理转换的正确性,对于将理论最优性转化为实际性能提升至关重要。现有数据库测试框架难以满足这一需求,因为必要的算法特定输入(如连接树)在标准测试用例生成中缺失,且将复杂算法集成到这些框架中会带来过高的工程开销。替代方案(如使用宏基准查询)本质上噪声过大,无法在此转换过程中隔离复杂缺陷。在本经验论文中,我们回顾性地分析了$\mathsf{CODA}$——一个在树追踪连接算法($\mathsf{TTJ}$,近期发表于ACM TODS的一种理论最优且实用的连接算法)物理协同设计过程中使用的计算机编排测试框架。通过合成最小可复现样例,$\mathsf{CODA}$成功隔离了细微的转换缺陷,例如状态管理错误以及连接树与丛生计划之间的映射冲突。我们证明,这种逻辑到物理的转换过程是一个双向反馈循环:早期的结构化测试不仅强化了$\mathsf{TTJ}$的物理实现,还暴露了一个直接优化了$\mathsf{TTJ}$自身形式化前置条件的边界条件。最后,我们详细阐述了应对这些转换挑战如何驱动了$\mathsf{CODA}$架构的演进,使其成为面向依赖连接树算法的鲁棒、结构感知的测试生成管道。