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 logical-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}$进行了回顾性分析——这是一个在逻辑-物理协同设计过程中使用的计算机编排测试框架,用于近期发表在ACM TODS上的TreeTracker Join ($\mathsf{TTJ}$)算法——一种理论上最优且实用的连接算法。通过合成最小可复现示例,$\mathsf{CODA}$成功隔离了细微的转换缺陷,例如状态管理不当以及连接树与灌木状计划之间的映射冲突。我们证明,这一逻辑到物理的转换过程是一个双向反馈环路:早期的结构性测试不仅强化了$\mathsf{TTJ}$的物理实现,还暴露了一个边界条件,直接优化了$\mathsf{TTJ}$本身的形式化前提条件。最后,我们详细阐述了应对这些转换挑战如何推动$\mathsf{CODA}$的架构演进,使其成为一个稳健的、基于结构的测试生成流水线,适用于依赖连接树的算法。