Synthesizing analytical SQL queries from computation demonstration
Xiangyu Zhou, Rastislav Bodík, Alvin Cheung, Chenglong Wang
摘要
Analytical SQL is widely used in modern database applications and data analysis. However, its partitioning and grouping operators are challenging for novice users. Unfortunately, programming by example, shown effective on standard SQL, are less attractive because examples for analytical queries are more laborious to solve by hand.
To make demonstrations easier to create, we designed a new end-user specification, programming by computation demonstration, that allows the user to demonstrate the task using a (possibly incomplete) cell-level computation trace. This specification is exploited in a new abstraction-based synthesis algorithm to prove that a partially formed query cannot be completed to satisfy the specification, allowing us to prune the search space.
We implemented our approach in a tool named Sickle and tested it on 80 real-world analytical SQL tasks. Results show that even from small demonstrations, Sickle can solve 76 tasks, in 12.8 seconds on average, while the prior approaches can solve only 60 tasks and are on average 22.5× slower. Our user study with 13 participants reveals that our specification increases user efficiency and confidence on challenging tasks.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Grounded Copilot: How Programmers Interact with Code-Generating Models 引用了 Small-Step Live Programming by Example
- Grounded Copilot: How Programmers Interact with Code-Generating Models 引用了 Falx: Synthesis-Powered Visualization Authoring
- Relational Query Synthesis ⋈ Decision Tree Learning 引用了 Provenance-guided synthesis of Datalog programs
- SlabCity: Whole-Query Optimization using Program Synthesis 引用了 Provenance-guided synthesis of Datalog programs
- Refinement Types for Visualization 引用了 Visualization by example
- Refinement Types for Visualization 引用了 Falx: Synthesis-Powered Visualization Authoring
引用它的顶会 Paper6
- Grounded Copilot: How Programmers Interact with Code-Generating ModelsShraddha Barke, Michael B. James, Nadia PolikarpovaOOPSLA 2023 · 408 次引用
- ImageEye: Batch Image Processing using Program SynthesisCeleste Barnaby, Qiaochu Chen, Roopsha Samanta, Isil DilligPLDI 2023 · 13 次引用
- SlabCity: Whole-Query Optimization using Program SynthesisRui Dong, Jie Liu, Yuxuan Zhu, Cong Yan 等VLDB 2023 · 11 次引用
- Relational Query Synthesis ⋈ Decision Tree LearningAaditya Naik, Aalok Thakkar, Adam Stein, Rajeev Alur 等VLDB 2024 · 2 次引用
- Refinement Types for VisualizationJingtao Xia, Junrui Liu, Nicholas Brown, Yanju Chen 等ASE 2024 · 1 次引用
它引用的 Paper11
- egg: Fast and extensible equality saturationMax Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt 等POPL 2021 · 170 次引用
- Provenance-guided synthesis of Datalog programsMukund Raghothaman, Jonathan Mendelson, David Zhao, Mayur Naik 等POPL 2020 · 49 次引用
- Small-Step Live Programming by ExampleKasra Ferdowsifard, Allen Ordookhanians, Hila Peleg, Sorin Lerner 等UIST 2020 · 40 次引用
- Visualization by exampleChenglong Wang, Yu Feng, Rastislav Bodík, Alvin Cheung 等POPL 2020 · 36 次引用
- Falx: Synthesis-Powered Visualization AuthoringChenglong Wang, Yu Feng, Rastislav Bodík, Isil Dillig 等CHI 2021 · 35 次引用
相关 Paper
- PATSQL: Efficient Synthesis of SQL Queries from Example Tables with Quick Inference of Projected ColumnsKeita Takenouchi, Takashi Ishio, Joji Okada, Yuji SakataVLDB 2021 · 19 次引用
- Synthesizing Graph Queries from DemonstrationsXiaoyu Liu, Qikang Liu, Evan Dyce, Keval Vora 等OOPSLA 2026
- Example-guided synthesis of relational queriesAalok Thakkar, Aaditya Naik, Nathaniel Sands, Rajeev Alur 等PLDI 2021 · 12 次引用
- Interactive Text-to-SQL Generation via Editable Step-by-Step ExplanationsYuan Tian, Zheng Zhang, Zheng Ning, Toby Jia-Jun Li 等EMNLP 2023 · 14 次引用
- Fast and Reliable Program Synthesis via User InteractionYanju Chen, Chenglong Wang, Xinyu Wang, Osbert Bastani 等ASE 2023 · 5 次引用
