Skip to content

refactor(storage): build an Iceberg table identifier from its namespace - #903

Merged
Tr00d merged 3 commits into
masterfrom
refactor/iceberg-namespace-table
Nov 26, 2026
Merged

Tr00d merged 3 commits into
masterfrom
refactor/iceberg-namespace-table

Conversation

@Tr00d

@Tr00d Tr00d commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Summary

A caller builds an Iceberg table identifier from its namespace, IcebergNamespace.Of("sales").Table("events"), instead of IcebergTable.Of(IcebergNamespace.Of("sales"), "events").

No capability change: this refines the identifier introduced with storage.analytics.create_table (#895) and used by load_table (#897), table_exists (#899) and delete_table (#900).

Public API

// added
public IcebergTable IcebergNamespace.Table(string name);

// removed (unshipped, PublicAPI.Unshipped.txt only)
public static IcebergTable IcebergTable.Of(IcebergNamespace @namespace, string name);
var events = IcebergNamespace.Of("sales").Table("events");
var europeEvents = IcebergNamespace.Of("sales", "europe").Table("events");

A two-string IcebergTable.Of("sales", "events") was rejected: IcebergNamespace.Of(params string[] levels) takes multi-level namespaces, so the extra string would be ambiguous between a level and the table name. IcebergTable.Of is removed rather than kept beside Table so there is one way to build the identifier. Not breaking: neither member has shipped.

Behavior

Unchanged. Table(null) throws ArgumentNullException (name); a blank, . or .. name still fails with ArgumentException when the path is built; the service validates the name.

Deviations from supabase-js

None. supabase-js takes untyped { namespace: string[], name } objects.

Tests

Tier Class Pins
Unit IcebergNamespaceTests Table keeps the namespace and name, rejects a null name, leaves a blank name to the service
Unit IcebergTableTests text form, equality and path, now built through Table
Contract CreateTable*, LoadTable*, TableExists*, DeleteTable* unchanged wire behavior through the new call shape

Changed-line coverage: 100% (2 lines). Mutation: 29/29 killed on IcebergNamespace.cs and IcebergTable.cs, 0 survivors.

Notes

The open List and Update Iceberg Table branches switch to .Table(...) when they merge master; their old IcebergTable.Of calls stop compiling, so none can be missed.

IcebergNamespace.Of("sales").Table("events") replaces
IcebergTable.Of(IcebergNamespace.Of("sales"), "events"). The namespace
builds its tables, and the params overload of IcebergNamespace.Of keeps a
two-argument IcebergTable factory from being unambiguous. Unshipped API only.
@Tr00d
Tr00d marked this pull request as ready for review November 26, 2026 09:50
@Tr00d
Tr00d merged commit 95624ed into master Nov 26, 2026
7 checks passed
@Tr00d
Tr00d deleted the refactor/iceberg-namespace-table branch November 26, 2026 10:00
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