Skip to content

fix(iceberg): scan into *interface{} in DROP SCHEMA CASCADE fallback#661

Merged
EDsCODE merged 1 commit into
mainfrom
fix/iceberg-drop-schema-cascade-scan
Jun 2, 2026
Merged

fix(iceberg): scan into *interface{} in DROP SCHEMA CASCADE fallback#661
EDsCODE merged 1 commit into
mainfrom
fix/iceberg-drop-schema-cascade-scan

Conversation

@EDsCODE
Copy link
Copy Markdown
Contributor

@EDsCODE EDsCODE commented Jun 2, 2026

What

Follow-up to #659. The Iceberg DROP SCHEMA … CASCADE compatibility fallback scanned the search_path setting and the member-table names into *string. That works on the standalone database/sql executor but fails on the Flight executor (control plane → worker), whose Scan contract requires *interface{}:

iceberg DROP SCHEMA CASCADE fallback failed: scan search_path: scan: destination 0 must be *interface{}

Surfaced by the Fivetran capability test (DROP SCHEMA IF EXISTS fivetran_testing_schema_… CASCADE), which runs through the multitenant control plane.

Fix

  • Scan single-column results into interface{} and coerce to string via a scanStringColumn helper, at both scan sites (search_path + member tables).
  • The test mock previously required *string — the inverse of the real Flight RowSet — which is why this slipped through. It now mirrors the real *interface{} contract, so a regression to a typed scan fails the test.

Testing

  • go build ./... + -tags kubernetes — clean
  • server suite green (incl. the DROP SCHEMA CASCADE fallback tests)
  • Verified end-to-end against a live local Lakekeeper: DROP SCHEMA … CASCADE on a schema containing a table drops the member tables then the schema successfully.

🤖 Generated with Claude Code

The DROP SCHEMA ... CASCADE compatibility fallback scanned search_path and
member-table rows into *string. That works on the standalone (database/sql)
executor but fails on the Flight executor (control plane / worker), whose Scan
contract requires *interface{}:

  iceberg DROP SCHEMA CASCADE fallback failed: scan search_path: scan:
  destination 0 must be *interface{}

(hit by the Fivetran capability test). Scan into interface{} and coerce to
string via a scanStringColumn helper. The test mock previously required *string
— the inverse of the real RowSet — so it masked the bug; it now mirrors the
*interface{} contract and guards against regression.

Verified: server suite green; live Lakekeeper DROP SCHEMA CASCADE (schema with a
table) succeeds end-to-end.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@EDsCODE EDsCODE merged commit f6ede56 into main Jun 2, 2026
22 checks passed
@EDsCODE EDsCODE deleted the fix/iceberg-drop-schema-cascade-scan branch June 2, 2026 21:33
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