Functional Programming on Top of SQL Engines.

Tobias Burghardt,Denis Hirn,Torsten Grust

PADL(2022)

引用 2|浏览2
暂无评分
摘要
SQL database systems support user-defined functions (UDFs), but they hardly encourage programming with these functions. Quite the contrary: the systems’ focus on plan-based query evaluation penalizes every function call at runtime, rendering programming with UDFs—especially if these are recursive—largely impractical. We propose to take UDFs for what they are (namely functions) and subject UDFs to a pipeline of function compilation techniques well-established by the FP community (CPS conversion, defunctionalization, and translation into trampolined style, in particular). The result is a non-invasive SQL-level compiler for recursive UDFs that naturally supports memoization and emits iterative CTEs which contemporary SQL engines evaluate efficiently. Functions may not be first class in SQL, but functional programming close to the data can still be efficient.
更多
查看译文
关键词
functional
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要