Skip to content

Clarify DuckLake metadata query intent - #12

Draft
bill-ph wants to merge 2 commits into
v1.5-variegatafrom
metadata-query-intent-api
Draft

Clarify DuckLake metadata query intent#12
bill-ph wants to merge 2 commits into
v1.5-variegatafrom
metadata-query-intent-api

Conversation

@bill-ph

@bill-ph bill-ph commented May 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Split DuckLakeTransaction metadata query entry points into Execute, SnapshotQuery, CurrentQuery, and RawQuery.
  • Mirror the explicit read/write API split in DuckLakeMetadataManager and PostgresMetadataManager.
  • Reclassify call sites so metadata DDL/DML uses Execute, snapshot-visible metadata reads use SnapshotQuery, current/latest metadata reads use CurrentQuery, and local DuckDB utility calls use RawQuery.

Why

This is Phase 3 of the metadata transaction-duration plan. It makes metadata call-site intent explicit before a later behavioral PR changes metadata transaction ownership. This PR does not shorten metadata transaction lifetime by itself; GetConnection still creates the metadata connection and begins its transaction.

Verification

  • cmake --build build/release --target ducklake_extension
  • ./build/release/test/unittest test/sql/stats/global_stats.test
  • ./build/release/test/unittest test/sql/stats/global_stats_transactions.test
  • ./build/release/test/unittest test/sql/data_inlining/inlined_data_multi_table_fresh_connection.test
  • ./build/release/test/unittest test/sql/add_files/add_files_transaction_local.test
  • ./build/release/test/unittest test/sql/transaction/basic_transaction.test
  • ./build/release/test/unittest test/sql/table_changes/ducklake_table_deletions_inlined_flush.test
  • ./build/release/test/unittest test/sql/deletion_inlining/test_deletion_inlining_transaction.test

Note: test/sql/metadata/postgres_metadata_passthrough.test was skipped locally because this build does not have postgres_scanner available.

Base automatically changed from fix-postgres-global-stats-passthrough to v1.5-variegata May 18, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant