Qr-Hint: Actionable Hints Towards Correcting Wrong SQL Queries
Yihao Hu, Amir Gilad, Kristin Stephens-Martinez, Sudeepa Roy, Jun Yang
摘要
We describe a system called Qr-Hint that, given a (correct) target query 𝑄 ★ and a (wrong) working query 𝑄, both expressed in SQL, provides actionable hints for the user to fix the working query so that it becomes semantically equivalent to the target. It is particularly useful in an educational setting, where novices can receive help from Qr-Hint without requiring extensive personal tutoring. Since there are many different ways to write a correct query, we do not want to base our hints completely on how 𝑄 ★ is written; instead, starting with the user's own working query, Qr-Hint purposefully guides the user through a sequence of steps that provably lead to a correct query, which will be equivalent to 𝑄 ★ but may still "look" quite different from it. Ideally, we would like Qr-Hint's hints to lead to the "smallest" possible corrections to 𝑄. However, optimality is not always achievable in this case due to some foundational hurdles such as the undecidability of SQL query equivalence and the complexity of logic minimization. Nonetheless, by carefully decomposing and formulating the problems and developing principled solutions, we are able to provide provably correct and locally optimal hints through Qr-Hint. We show the effectiveness of Qr-Hint through quality and performance experiments as well as a user study in an educational setting.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper3
- The Power of Constraints in Natural Language to SQL TranslationTonghui Ren, Chen Ke, Yuankai Fan, Yinan Jing 等VLDB 2025 · 被引用 4 次
- Towards Selecting Informative Alternative Relational Query Plans for Database EducationHui Li, Hu Wang, Sourav S. Bhowmick, Zihao MaSIGMOD 2026
- I-Rex: An Interactive Debugger for SQLYihao Hu, Zian Chen, Zhiming Leong, Sharan Sokhi 等VLDB 2026
它引用的顶会 Paper5
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 被引用 64,255 次
- CoCoNuT: combining context-aware neural translation models using ensemble for program repairThibaud Lutellier, Hung Viet Pham, Lawrence Pang, Yitong Li 等ISSTA 2020 · 被引用 325 次
- TFix: Learning to Fix Coding Errors with a Text-to-Text TransformerBerkay Berabi, Jingxuan He, Veselin Raychev, Martin T. VechevICML 2021 · 被引用 143 次
- QueryVis: Logic-based Diagrams help Users Understand Complicated SQL Queries FasterAristotelis Leventidis, Jiahui Zhang, Cody Dunne, Wolfgang Gatterbauer 等SIGMOD 2020 · 被引用 36 次
- Understanding Queries by Conditional InstancesAmir Gilad, Zhengjie Miao, Sudeepa Roy, Jun YangSIGMOD 2022 · 被引用 9 次
相关 Paper
- Polygon: Symbolic Reasoning for SQL using Conflict-Driven Under-Approximation SearchPinhan Zhao, Yuepeng Wang, Xinyu WangPLDI 2025
- Dial: A Knowledge-Grounded Dialect-Specific NL2SQL SystemXiang Zhang, Le Zhou, Hongming Xu, Wei Zhou 等VLDB 2026 · 被引用 2 次
- Automated Validating and Fixing of Text-to-SQL Translation with Execution ConsistencyYicun Yang, Zhaoguo Wang, Yu Xia, Zhuoran Wei 等SIGMOD 2025 · 被引用 7 次
- VeriEQL: Bounded Equivalence Verification for Complex SQL Queries with Integrity ConstraintsYang He, Pinhan Zhao, Xinyu Wang, Yuepeng WangOOPSLA 2024 · 被引用 12 次
- Interactive Text-to-SQL Generation via Editable Step-by-Step ExplanationsYuan Tian, Zheng Zhang, Zheng Ning, Toby Jia-Jun Li 等EMNLP 2023 · 被引用 14 次
