programming by example
Recently Published Documents


TOTAL DOCUMENTS

66
(FIVE YEARS 14)

H-INDEX

10
(FIVE YEARS 1)

2021 ◽  
Author(s):  
Bo Wang ◽  
Teodora Baluta ◽  
Aashish Kolluri ◽  
Prateek Saxena

2021 ◽  
Vol 14 (11) ◽  
pp. 1937-1949
Author(s):  
Keita Takenouchi ◽  
Takashi Ishio ◽  
Joji Okada ◽  
Yuji Sakata

SQL is one of the most popular tools for data analysis, and it is now used by an increasing number of users without having expertise in databases. Several studies have proposed programming-by-example approaches to help such non-experts to write correct SQL queries. While existing methods support a variety of SQL features such as aggregation and nested query, they suffer a significant increase in computational cost as the scale of example tables increases. In this paper, we propose an efficient algorithm utilizing properties known in relational algebra to synthesize SQL queries from input and output tables. Our key insight is that a projection operator in a program sketch can be lifted above other operators by applying transformation rules in relational algebra, while preserving the semantics of the program. This enables a quick inference of appropriate columns in the projection operator, which is an essential component in synthesis but causes combinatorial explosions in prior work. We also introduce a novel form of constraints and its top-down propagation mechanism for efficient sketch completion. We implemented this algorithm in our tool PATSQL and evaluated it on 226 queries from prior benchmarks and Kaggle's tutorials. As a result, PATSQL solved 68% of the benchmarks and found 89% of the solutions within a second. Our tool is available at https://naist-se.github.io/patsql/.


2020 ◽  
Vol 4 (OOPSLA) ◽  
pp. 1-29
Author(s):  
Ruyi Ji ◽  
Yican Sun ◽  
Yingfei Xiong ◽  
Zhenjiang Hu

Author(s):  
Kasra Ferdowsifard ◽  
Allen Ordookhanians ◽  
Hila Peleg ◽  
Sorin Lerner ◽  
Nadia Polikarpova

Sign in / Sign up

Export Citation Format

Share Document