VeriEQL: Bounded Equivalence Verification for Complex SQL Queries with Integrity Constraints
Yang He, Pinhan Zhao, Xinyu Wang, Yuepeng Wang
摘要
The task of SQL query equivalence checking is important in various real-world applications (including query rewriting and automated grading) that involve complex queries with integrity constraints; yet, state-of-the-art techniques are very limited in their capability of reasoning about complex features (e.g., those that involve sorting, case statement, rich integrity constraints, etc.) in real-life queries. To the best of our knowledge, we propose the first SMT-based approach and its implementation, VeriEQL, capable of proving and disproving bounded equivalence of complex SQL queries. VeriEQL is based on a new logical encoding that models query semantics over symbolic tuples using the theory of integers with uninterpreted functions. It is simple yet highly practical -- our comprehensive evaluation on over 20,000 benchmarks shows that VeriEQL outperforms all state-of-the-art techniques by more than one order of magnitude in terms of the number of benchmarks that can be proved or disproved. VeriEQL can also generate counterexamples that facilitate many downstream tasks (such as finding serious bugs in systems like MySQL and Apache Calcite).
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 12 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Automated Validating and Fixing of Text-to-SQL Translation with Execution Consistency 引用了 SPES: A Symbolic Approach to Proving Query Equivalence Under Bag Semantics
- ParSEval: Plan-aware Test Database Generation for SQL Equivalence Evaluation 引用了 SPES: A Symbolic Approach to Proving Query Equivalence Under Bag Semantics
- SpotIt: Evaluating Text-to-SQL Evaluation with Formal Verification 引用了 SPES: A Symbolic Approach to Proving Query Equivalence Under Bag Semantics
- Graphiti: Bridging Graph and Relational Database Queries 引用了 Data Migration using Datalog Program Synthesis
- Graphiti: Bridging Graph and Relational Database Queries 引用了 SPES: A Symbolic Approach to Proving Query Equivalence Under Bag Semantics
引用它的顶会 Paper12
- Automated Validating and Fixing of Text-to-SQL Translation with Execution ConsistencyYicun Yang, Zhaoguo Wang, Yu Xia, Zhuoran Wei 等SIGMOD 2025 · 7 次引用
- SpotIt: Evaluating Text-to-SQL Evaluation with Formal VerificationRocky Klopfenstein, Yang He, Andrew Tremante, Yuepeng Wang 等ICLR 2026 · 6 次引用
- Graphiti: Bridging Graph and Relational Database QueriesYang He, Ruijie Fang, Isil Dillig, Yuepeng WangPLDI 2025 · 3 次引用
- Checking Observational Correctness of Database SystemsLauren Pick, Amanda Xu, Ankush Desai, Sanjit A. Seshia 等OOPSLA 2025 · 2 次引用
- ParSEval: Plan-aware Test Database Generation for SQL Equivalence EvaluationChunyu Chen, Zhengjie Miao, Yong Zhang, Jiannan WangVLDB 2025 · 1 次引用
它引用的 Paper3
- Data Migration using Datalog Program SynthesisYuepeng Wang, Rushi Shah, Abby Criswell, Rong Pan 等VLDB 2020 · 30 次引用
- SPES: A Symbolic Approach to Proving Query Equivalence Under Bag SemanticsQi Zhou, Joy Arulraj, Shamkant B. Navathe, William Harris 等ICDE 2022 · 19 次引用
- Deductive optimization of relational data storageJohn K. Feser, Sam Madden, Nan Tang, Armando Solar-LezamaOOPSLA 2020 · 5 次引用
相关 Paper
- Proving Query Equivalence Using Linear Integer ArithmeticHaoran Ding, Zhaoguo Wang, Yicun Yang, Dexin Zhang 等SIGMOD 2024 · 20 次引用
- Polygon: Symbolic Reasoning for SQL using Conflict-Driven Under-Approximation SearchPinhan Zhao, Yuepeng Wang, Xinyu WangPLDI 2025
- QED: A Powerful Query Equivalence Decider for SQLShuxian Wang, Sicheng Pan, Alvin CheungVLDB 2024 · 19 次引用
- Skeletal approximation enumeration for SMT solver testingPeisen Yao, Heqing Huang, Wensheng Tang, Qingkai Shi 等FSE 2021 · 20 次引用
- Translating canonical SQL to imperative code in CoqVéronique Benzaken, Evelyne Contejean, Mohammed Houssem Hachmaoui, Chantal Keller 等OOPSLA 2022 · 3 次引用
