paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Automated Translation of Functional Big Data Queries to SQL

函数式大数据查询到 SQL 的自动翻译
OOPSLA 7(OOPSLA1)2023匹配度 2/10 · 论文属于程序合成与编译代码生成,目标是将 Spark RDD 函数式查询转译为 SQL,不涉及 LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析。它仅与 PL/程序合成方向有弱关联,因此与用户当前核心研究画像匹配度较低。引用 5 inbox
Guoqiang Zhang, Benjamin Mariano, Xipeng Shen, Işıl Dillig
crossref: 2026-09-10

AI 速览

一句话:提出基于反例引导合成与列式分解的 RDD2SQL,将 Spark 函数式查询自动转译为 SQL 并提升性能。

Apache Spark、Flink 等大数据框架允许用户用函数式 API 编写分布式查询,但这类查询通常不如 SQL 高效。本文提出一种将函数式查询自动转译为 SQL 的技术。方法基于反例引导的归纳合成(CEGIS),并引入新颖的按列分解技术,将整体合成任务拆分为若干更小的子查询合成问题。作者实现工具 RDD2SQL,用于把 Spark RDD 查询翻译为 SQL,并在真实 RDD 查询上评估。结果表明:大多数 RDD 查询可被翻译为 SQL,工具能有效自动化该翻译,且翻译后获得显著性能收益。

问题
函数式大数据查询 API 易用,但其查询效率常不及等价的 SQL;核心问题是如何自动将函数式大数据查询转译为 SQL。
方法
采用反例引导的归纳合成(CEGIS)框架,并引入按列分解技术将查询合成任务拆分为较小的子查询合成问题,实现为 RDD2SQL 工具。
评估
在真实世界的 Spark RDD 查询上评估 RDD2SQL,考察翻译成功率、自动化效果以及翻译为 SQL 后的性能收益。
原文摘要(Abstract)

Big data analytics frameworks like Apache Spark and Flink enable users to implement queries over large, distributed databases using functional APIs. In recent years, these APIs have grown in popularity because their functional interfaces abstract away much of the minutiae of distributed programming required by traditional query languages like SQL. However, the convenience of these APIs comes at a cost because functional queries are often less efficient than their SQL counterparts. Motivated by this observation, we present a new technique for automatically transpiling functional queries to SQL. While our approach is based on the standard paradigm of counterexample-guided inductive synthesis, it uses a novel column-wise decomposition technique to split the synthesis task into smaller subquery synthesis problems. We have implemented this approach as a new tool called RDD2SQL for translating Spark RDD queries to SQL and empirically evaluate the effectiveness of RDD2SQL on a set of real-world RDD queries. Our results show that (1) most RDD queries can be translated to SQL, (2) our tool is very effective at automating this translation, and (3) performing this translation offers significant performance benefits.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2022,
  title = {Automated Translation of Functional Big Data Queries to SQL},
  author = {Guoqiang Zhang and Benjamin Mariano and Xipeng Shen and Işıl Dillig},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {OOPSLA1},
  year = {2023},
  doi = {10.1145/3586047}
}