OpenIVM:用于增量计算的 SQL-to-SQL 编译器
OpenIVM: a SQL-to-SQL Compiler for Incremental Computations
AI总结:
本文提出开源 SQL-to-SQL 编译器 OpenIVM,通过复用现有 SQL 引擎执行增量视图维护计算,避免代码重复,并支持跨系统 HTAP 场景下的增量传播。
摘要:
本演示介绍了一款用于增量视图维护(IVM)的新型开源 SQL-to-SQL 编译器。以往的系统(如 DBToaster)在独立系统中实现 IVM 的计算功能,而 OpenIVM 的核心原则是利用现有的 SQL 查询处理引擎,并通过 SQL 执行所有 IVM 计算。这种方法无需代码重复即可在这些系统中集成 IVM。同时,它简化了在跨系统 IVM 中的使用,即编排一个 HTAP 系统,其中一个(OLTP)DBMS 提供插入/更新/删除(增量),并通过 SQL 将其传播到另一个(OLAP)DBMS,后者托管物化视图。遵循 DBSP 原则,我们的系统将视图定义编译为 SQL,最终将增量传播到物化视图的表中。在底层,OpenIVM 使用 DuckDB 库来编译(解析、转换、优化)物化视图维护逻辑。我们演示了 OpenIVM 的实际应用:(i) 作为 DuckDB 扩展模块的核心,为其添加 IVM 功能;(ii) 为 HTAP 提供跨系统 IVM 支持,由 PostgreSQL 处理基表的更新,并由 DuckDB 托管这些表的物化视图。
英文摘要:
This demonstration presents a new Open Source SQL-to-SQL compiler for Incremental View Maintenance (IVM). While previous systems, such as DBToaster, implemented computational functionality for IVM in a separate system, the core principle of OpenIVM is to make use of existing SQL query processing engines and perform all IVM computations via SQL. This approach enables the integration of IVM in these systems without code duplication. Also, it eases its use in cross-system IVM, i.e. to orchestrate an HTAP system in which one (OLTP) DBMS provides insertions/updates/deletes (deltas), which are propagated using SQL into another (OLAP) DBMS, hosting materialized views. Our system compiles view definitions into SQL to eventually propagate deltas into the table that materializes the view, following the principles of DBSP. Under the hood, OpenIVM uses the DuckDB library to compile (parse, transform, optimize) the materialized view maintenance logic. We demonstrate OpenIVM in action (i) as the core of a DuckDB extension module that adds IVM functionality to it and (ii) powering cross-system IVM for HTAP, with PostgreSQL handling updates on base tables and DuckDB hosting materialized views on these.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。