YeSQL: "You extend SQL" with Rich and Highly Performant User-Defined Functions in Relational Databases
Yannis E. Foufoulas, Alkis Simitsis, Eleftherios Stamatogiannakis, Yannis E. Ioannidis
摘要
The diversity and complexity of modern data management applications have led to the extension of the relational paradigm with syntactic and semantic support for User-Defined Functions (UDFs). Although well-established in traditional DBMS settings, UDFs have become central in many application contexts as well, such as data science, data analytics, and edge computing. Still, a critical limitation of UDFs is the impedance mismatch between their evaluation and relational processing. In this paper, we present YeSQL, an SQL extension with rich UDF support along with a pluggable architecture to easily integrate it with either server-based or embedded database engines. YeSQL currently supports Python UDFs fully integrated with relational queries as scalar, aggregator, or table functions. Key novel characteristics of YeSQL include easy implementation of complex algorithms and several performance enhancements, including tracing JIT compilation of Python UDFs, parallelism and fusion of UDFs, stateful UDFs, and seamless integration with a database engine. Our experimental analysis showcases the usability and expressiveness of YeSQL and demonstrates that our techniques of minimizing context switching between the relational engine and the Python VM are very effective and achieve significant speedups up to 68x in common, practical use cases compared to earlier approaches and alternative implementation choices.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Procedural Extensions of SQL: Understanding their usage in the wild 引用了 Aggify: Lifting the Curse of Cursor Loops using Custom Aggregates
- Declarative Sub-Operators for Universal Data Processing 引用了 Procedural Extensions of SQL: Understanding their usage in the wild
- Predicate Pushdown for Data Science Pipelines 引用了 Aggify: Lifting the Curse of Cursor Loops using Custom Aggregates
- Predicate Pushdown for Data Science Pipelines 引用了 Tuplex: Data Science in Python at Native Code Speed
- HiPy: Extracting High-Level Semantics from Python Code for Data Processing 引用了 Tuplex: Data Science in Python at Native Code Speed
引用它的顶会 Paper3
- Declarative Sub-Operators for Universal Data ProcessingMichael Jungmair, Jana GicevaVLDB 2023 · 17 次引用
- Predicate Pushdown for Data Science PipelinesCong Yan, Yin Lin, Yeye HeSIGMOD 2023 · 15 次引用
- HiPy: Extracting High-Level Semantics from Python Code for Data ProcessingMichael Jungmair, Alexis Engelke, Jana GicevaOOPSLA 2024 · 7 次引用
它引用的 Paper3
- Procedural Extensions of SQL: Understanding their usage in the wildSurabhi Gupta, Karthik RamachandraVLDB 2021 · 34 次引用
- Tuplex: Data Science in Python at Native Code SpeedLeonhard F. Spiegelberg, Rahul Yesantharao, Malte Schwarzkopf, Tim KraskaSIGMOD 2021 · 32 次引用
- Aggify: Lifting the Curse of Cursor Loops using Custom AggregatesSurabhi Gupta, Sanket Purandare, Karthik RamachandraSIGMOD 2020 · 22 次引用
相关 Paper
- User-Defined Operators: Efficiently Integrating Custom Algorithms into Modern DatabasesMoritz Sichert, Thomas NeumannVLDB 2022 · 23 次引用
- Udon: Efficient Debugging of User-Defined Functions in Big Data Systems with Line-by-Line ControlYicong Huang, Zuozhi Wang, Chen LiSIGMOD 2024 · 6 次引用
- QURE: AI-Assisted and Automatically Verified UDF InliningTarique Siddiqui, Arnd Christian König, Jiashen Cao, Cong Yan 等SIGMOD 2025 · 2 次引用
- The UDFBench Benchmark for General-purpose UDF QueriesYannis Foufoulas, Theoni Palaiologou, Alkis SimitsisVLDB 2025
- MONSOON: Multi-Step Optimization and Execution of Queries with Partially Obscured PredicatesSourav Sikdar, Chris JermaineSIGMOD 2020 · 6 次引用
