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

Aperta
#73 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp, sql
Ambito
databases

Direzione di ricerca

Inizia leggendo e risolvendo la issue prerequisito #68, quindi esegui la riproduzione SQL DuckDB fornita su una tabella Delta gestita tramite le estensioni uc_catalog e delta. Confronta il comportamento di UPDATE e DELETE dopo che le letture funzionano; il lavoro è completato quando entrambe le istruzioni hanno esito positivo tramite Unity Catalog REST senza l’errore del binder, oppure quando il fallimento rimanente è isolato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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 '<workspace_url>', AWS_REGION 'us-east-1');
ATTACH '' AS uc (TYPE UC_CATALOG);

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

-- DELETE fails with same error:
DELETE FROM uc..<managed_delta_table>
WHERE col = (SELECT MAX(col) FROM uc..<managed_delta_table>);
-- 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
Lingua principale
Python
Stelle
111
Fork
50
Merge medio
1g 8h
PR unite (30g)
9

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di duckdb/unity_catalog

Tutte le issue di duckdb/unity_catalog

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.