Skip to content

feat: CREATE/ALTER/DROP VIEW and MACRO in DuckLake catalog #126

Description

@qsliu2017

Parent: #124

Summary

Upstream ducklake stores views and macros (UDFs) in the DuckLake catalog with full snapshot tracking. pg_ducklake should support creating, altering, and dropping these objects with metadata synced to DuckLake.

Features

Views

  • CREATE VIEW -- store view SQL definition in DuckLake metadata
  • ALTER VIEW -- modify view definition
  • DROP VIEW -- remove view from DuckLake metadata
  • Views should participate in snapshot versioning (time-travel queryable)

Macros (UDFs)

  • CREATE MACRO (scalar macros) -- store macro definition in DuckLake catalog
  • CREATE MACRO (table macros) -- store table macro definition
  • DROP MACRO -- remove macro from DuckLake catalog

Implementation notes

  • Requires new event trigger handlers for VIEW and MACRO DDL events
  • Views in DuckLake are stored as SQL text in metadata, not as PG views
  • Need to decide: should these also create corresponding PG views/functions, or only exist in the DuckLake catalog?
  • Related: feat: materialized view using ducklake #25 (materialized views)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions