From fd8f2b5ee03921855dc0c143e82c7200cd0b0798 Mon Sep 17 00:00:00 2001 From: Gordon Murray Date: Wed, 15 Apr 2026 20:20:00 +0100 Subject: [PATCH] polish(errors): make delete-manifest rejection message actionable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous error told users only what went wrong ("contains row-level deletes", "append-only Iceberg v1/v2 only") without telling them how to fix it. In practice the fix is always 'compact the table' — make that explicit with the concrete commands for the three tools users are already running (Spark, Trino, Iceberg CLI). --- backend/main.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/main.py b/backend/main.py index cbe4c52..d2addf5 100644 --- a/backend/main.py +++ b/backend/main.py @@ -403,9 +403,13 @@ def _validate_iceberg_table(conn: duckdb.DuckDBPyConnection, table_path: str) -> raise HTTPException( status_code=400, detail=( - "Table contains row-level deletes which are not supported. " - "This application only supports append-only Iceberg v1/v2 tables. " - "Reading this table may return incorrect data." + "Table has row-level deletes (position or equality). Cloudfloe " + "reads would return rows the Iceberg metadata has marked removed, " + "so the query is blocked rather than silently wrong. " + "Compact the table first — Spark: " + "`CALL system.rewrite_data_files('..')`; " + "Trino: `ALTER TABLE
EXECUTE optimize`; " + "Iceberg CLI: `iceberg rewrite_data_files`. Then retry." ), )