论文标题
从计算演示中综合分析SQL查询
Synthesizing Analytical SQL Queries from Computation Demonstration
论文作者
论文摘要
分析SQL广泛用于现代数据库应用程序和数据分析。但是,其分区和分组操作员对新手用户的挑战。不幸的是,在标准SQL上有效显示的程序制定较不吸引人,因为分析查询的示例更努力地手工求解。 为了使演示更易于创建,我们设计了一种新的最终用户规范(通过计算演示编程),该规范使用户可以使用(可能不完整的)单元格级计算跟踪演示任务。在新的基于抽象的合成算法中利用此规范,以证明无法完成部分形成的查询以满足规范,从而使我们可以修剪搜索空间。 我们在一个名为Sickle的工具中实现了方法,并在80个现实的分析SQL任务上对其进行了测试。结果表明,即使在小型演示中,镰刀也可以在平均12.8秒内解决76个任务,而先前的方法只能解决60个任务,平均速度慢22.5倍。我们与13名参与者的用户研究表明,我们的规范提高了用户效率和对具有挑战性的任务的信心。
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.5x slower. Our user study with 13 participants reveals that our specification increases user efficiency and confidence on challenging tasks.