duckdb / duckdb/unity_catalog

UPDATE/DELETE on managed Delta tables via UC REST fails: 'Can only update/delete from base table'

Open
#73 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
110
Forks
44
Avg merge
2d 13h
Merged PRs (30d)
4

Description

## Summary

UPDATE and DELETE statements on managed **Delta** tables via the \`uc_catalog\` extension fail at the binder level with:

\`\`\`
Binder Error: Can only update/delete from base table
\`\`\`

This error occurs before reaching the write path — it appears the binder doesn't recognize UC-attached Delta tables as base tables eligible for mutation.

> **Note on scope:** This issue was originally filed against managed Iceberg tables. That was a misframing — the \`uc_catalog\` extension uses Delta readers/writers, so managed Delta table writes are the correct target for this extension. Managed Iceberg writes should go through an Iceberg REST catalog with native Iceberg writers instead.

## Steps to Reproduce

\`\`\`sql
INSTALL uc_catalog FROM core; LOAD uc_catalog;
INSTALL delta; LOAD delta;
-- Unnamed secret required (workaround for #48)
CREATE SECRET (TYPE UC, TOKEN '', ENDPOINT '', AWS_REGION 'us-east-1');
ATTACH '' AS uc (TYPE UC_CATALOG);

-- UPDATE fails:
UPDATE uc..
SET col = col
WHERE col = (SELECT MIN(col) FROM uc..);
-- Binder Error: Can only update/delete from base table

-- DELETE fails with same error:
DELETE FROM uc..
WHERE col = (SELECT MAX(col) FROM uc..);
-- Binder Error: Can only update/delete from base table
\`\`\`

## Expected Behavior

UPDATE/DELETE on managed Delta tables should work via UC REST, since Delta write support is the stated capability of this extension.

## Current Status / Prerequisite

Clean isolation of this error on Delta tables has been blocked by a prerequisite issue: reads of managed Delta tables via UC REST are currently failing with a `Bad Request` error (#68). Until Delta table reads are unblocked, it is unclear whether the UPDATE/DELETE binder error is the only issue or whether it will surface cleanly once reads work. This issue should be revisited after #68 is resolved.

## Environment

- DuckDB: 1.5.0
- Extensions: uc_catalog, delta (latest from core)
- Catalog: Databricks Unity Catalog

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.