Thanks Amogh for the detailed response! > 1. On unregisterTable, we can't force every implementation to support it. But portability is a big reason people pick an open table format in the first place, so catalogs have a strong reason to offer a way to move tables out. I think that works better than anything we could enforce in the spec.
I partly agree. We cannot force every implementation to support unregisterTable, but catalog vendors may also have an incentive not to make migration easy unless users explicitly require it. That is why, I would like to see this implication called out prominently in the spec. Not every Iceberg user has the same understanding of these details as people on the dev list. If metadata.json becomes optional, users should know when portability depends on catalog capabilities rather than the files in storage. > 2. Even without unregisterTable, the loadTable response has the full table metadata, so anyone who needs a metadata.json file can write one from it. Yes, although we don't have a corresponding registerTable operation that accepts a loadTable response. So this makes migration possible, but not necessarily straightforward. > 3. On catalog load from distributed workers [..] Without the file, that case has the same choice as any other: broadcast the full metadata or load it from the catalog. Broadcasting full metadata could become expensive, particularly for streaming ingest tables with long snapshot histories. I know Hive also used SerializableTable to ensure that workers saw the same table state during a query. It would be useful to understand how Trino, Impala, and other engines handle this. > I don't think current implementations should dictate how we change the spec, Agreed. I think this is fundamentally a spec discussion. We conceptually change the Catalog abstraction. Instead of metadata.json being directly accessible to clients, the REST Catalog API becomes the authoritative interface for obtaining TableMetadata. > and these assumptions are easy to fix without much of a tradeoff This is where I am less convinced. The implementations should not dictate the spec, but they can help us understand the consequences of the change. If these cases are easy to fix, we can fix them in our code too. But I think we still need to decide what the intended distributed execution model is in these cases. Should SerializableTable carry the full TableMetadata? Should we represent a table pinned to a particular version and let executors retrieve that version from the catalog? Or will we find that SerializableTable is really an overkill because workers normally need only a relatively small subset of the table state, such as schema, FileIO, and encryption configuration? These choices have different implications for metadata size, catalog load, consistency, and distributed execution. So overall, I think the direction is good. I am mostly concerned that we are concluding too quickly that there is not much of a tradeoff. Removing equality deletes also has serious tradeoffs that we may have underestimated. They might have been particularly valuable for high-frequency update workloads, where many single-file commits increase the opportunity for commits, and larger compaction commits have a high chance of encountering conflicts. Thanks, Peter Gang Wu <[email protected]> ezt írta (időpont: 2026. dec. 3., Cs, 3:53): > +1 for this direction. > > I just wanted to add that we should provide a way to retrieve or > materialize the metadata.json file via the REST Catalog API for those who > still need it. Whether this is done through a dedicated endpoint or by > embedding the capability into existing ones like loadTable or > unregisterTable, API support for this would be very helpful. > > Best, > Gang > > On Thu, Dec 3, 2026 at 2:14 AM Amogh Jahagirdar <[email protected]> wrote: > >> Hi Kevin, >> >> Thanks for starting this thread. I'm +1 on making metadata.json optional >> in storage. >> >> My position on this has changed. Almost three years ago, in an earlier >> thread on the REST spec and the table spec ( >> http://www.mail-archive.com/[email protected]/msg05674.html), I was >> against this, mostly because of interoperability and lock-in concerns. Back >> then the metadata file in storage was the most reliable way to move a table >> between catalogs. Since then there are a lot more IRC options, both OSS and >> from vendors, so users have real choice in catalogs that speak the same >> protocol. The protocol is now the mechanism that makes tables portable, and >> I think the spec should reflect that. >> >> To Kevin's point, this further improves write latencies, and it also >> addresses other cases of bloated metadata, like wide schemas that went >> through many evolutions, where catalogs can manage that without adding >> complexity to the format. >> >> Peter, I understand the concerns, but I think we can address them: >> >> 1. On unregisterTable, we can't force every implementation to support it. >> But portability is a big reason people pick an open table format in the >> first place, so catalogs have a strong reason to offer a way to move tables >> out. I think that works better than anything we could enforce in the spec. >> >> 2. Even without unregisterTable, the loadTable response has the full >> table metadata, so anyone who needs a metadata.json file can write one from >> it. >> >> 3. On catalog load from distributed workers, I looked at the Spark and >> Flink integrations in the Java reference implementation, and I'd appreciate >> input from others on what other engines do. The dominant case is that >> workers get a SerializableTable, a read-only copy of the table with a >> subset of its metadata, like the schema, specs and FileIO. That's all Spark >> reads and writes and Flink sink writers and source readers need, so they >> never read the metadata file or call the catalog. The rarer case is a >> worker that needs the full metadata. Flink operators that need the latest >> state, like committers, split enumerators and maintenance tasks, already >> load the table from the catalog for that. The one case I found that reads >> the full metadata file from storage instead is Flink's data file rewrite in >> table maintenance. Without the file, that case has the same choice as any >> other: broadcast the full metadata or load it from the catalog. >> >> 4. I don't think current implementations should dictate how we change the >> spec, and these assumptions are easy to fix without much of a tradeoff. For >> REST tables, these are the places in the Java implementation that still >> expect a metadata file: >> - RESTTableOperations skips applying new metadata on refresh and commit >> when there's no metadata location, so it would need a different way to >> compare. >> - SerializableTable reads the metadata file in that Flink rewrite case. >> It could carry the already loaded TableMetadata instead >> (StaticTableOperations already supports this), or the rewrite could load >> from the catalog. >> - The history, snapshots, refs, metadata_log_entries and partitions >> metadata tables don't read the file, but use its path to name their scan >> task, so they'd simply just need a different name as far as I can tell. >> - Spark purgeTable, DeleteReachableFiles, RewriteTablePath and orphan >> file removal start from or walk metadata file paths. The metadata file part >> of these is mostly moot if the catalog isn't producing metadata files on >> write. >> >> Thanks, >> Amogh >> >> On Wed, Dec 2, 2026 at 4:08 PM Renjie Liu <[email protected]> >> wrote: >> >>> Hi, Kevin: >>> >>> Thanks for raising this. +1 for this direction. >>> >>> On Wed, Dec 2, 2026 at 1:57 PM Péter Váry <[email protected]> >>> wrote: >>> >>> Hi Kevin, >>> >>> Is unregisterTable mandatory? Do we enforce interoperability? Or we will >>> rely on well informed users who will migrate only to catalogs where this >>> function is available if portability is a concern for them? >>> >>> Non-destructive fetch of full metadata json would be useful for cases >>> where algorithmic processing of table data is needed. >>> >>> I would definitely go through the cases in our codebase where metadata >>> json is used today, and find a solution for them before changing the spec. >>> There are some legitimate cases where we want to share the exact, current >>> state of the table between multiple executors and we don't want to add more >>> load on the catalogs to serve these requests. >>> >>> Thanks, >>> Peter >>> >>> >>> >>> On Tue, Dec 1, 2026, 22:29 Xander Bailey <[email protected]> wrote: >>> >>> Hi Kevin, >>> >>> +1, and I'd like to push harder on the encryption point. I think it's a >>> core reason to do this. >>> >>> Encrypted tables still keep metadata.json in plaintext, which leaks >>> things like column names (diagnosis_code, salary, ...). >>> >>> Looking further ahead, catalog-owned metadata could also open the door >>> to things like branch or version-level permissions. I don't want to >>> sidetrack this thread with that, but it could be worth exploring later if >>> we go this way. >>> >>> Best, >>> Xander >>> >>> >>> On Tue, 1Dec 2026 at 12:33, Kevin Liu via dev <[email protected]> >>> wrote: >>> >>> Hi everyone, >>> >>> I want to continue the discussion on making the `metadata.json` file in >>> storage optional and relying on the REST catalog response instead. This has >>> come up in a few past threads [1][2][3], and it recently came up again in >>> the `loadTableV2` discussion in PR #17642 [4], so I think it warrants its >>> own discussion thread. >>> >>> My main motivation is speeding up streaming and high-frequency writes, >>> especially combined with v4 single-file commits. Today the commit protocol >>> requires writing a new `metadata.json` file to object storage on every >>> commit. Making it optional removes that extra storage I/O from the commit >>> path. There are other benefits too, like cheaper commit retries (on a >>> conflict, the catalog no longer has to write and discard a `metadata.json` >>> file), avoiding plaintext metadata files for encrypted tables, and letting >>> catalogs control access to table metadata (for example, redacting sensitive >>> metadata) instead of clients reading it directly from storage. >>> >>> The main concern from past discussions is interoperability and catalog >>> lock-in. The `unregisterTable` endpoint [5] helps address migration since a >>> catalog can materialize and return the final `metadata.json` and >>> `metadata-location` when moving a table to another catalog. One gap is that >>> `unregisterTable` is destructive, so it doesn't cover non-destructive >>> export for backup, DR, or debugging. `loadTable?snapshots=all` covers part >>> of that, and we could also consider a dedicated export endpoint. >>> >>> If we move forward, here is the work I think we need to get there: >>> >>> 1. Update the table spec [6] so commits no longer require writing a new >>> `metadata.json` file to storage on every commit, as long as the catalog >>> guarantees atomic commits and a linear history. >>> 2. Update the REST spec to clarify optional `metadata-location` across >>> `LoadTableResult` [7] (currently optional for staged creates) and >>> `CommitTableResponse` [8] (currently required), and clarify the portability >>> contract for `unregisterTable` and `loadTable?snapshots=all`. >>> 3. Remove hard dependencies on `metadata.json` in storage across clients >>> and engines, such as `RESTTableOperations`, `SerializableTable`, >>> `StaticTableOperations`, static metadata tables, and maintenance actions >>> (Yufei started tracking these in [9]). >>> >>> I'd like to use this thread to build consensus on making `metadata.json` >>> optional in storage. One open question is scope: should this apply to v4 >>> tables only, or to any table loaded through `loadTableV2`? Existing clients >>> expect `metadata-location` in `CommitTableResponse`, which is part of why >>> scope matters. >>> >>> Let me know what you think! >>> >>> Best, >>> Kevin Liu >>> >>> [1] https://lists.apache.org/thread/clfpm1spd0k6rrvwm3nbt1cs3so7tsjt >>> [2] https://lists.apache.org/thread/l1onvv5p5cq2vtql9g8w5fbxc1hhd65l >>> [3] https://lists.apache.org/thread/5g6zfo0yyw8k5lzdd266sb270rxh7tnn >>> [4] https://github.com/apache/iceberg/pull/17642 >>> [5] >>> https://github.com/apache/iceberg/blob/121c73fcdcdc7d851ce65634e92fd2a5dc6c3254/open-api/rest-catalog-open-api.yaml#L1374-L1388 >>> [6] >>> https://github.com/apache/iceberg/blob/121c73fcdcdc7d851ce65634e92fd2a5dc6c3254/format/spec.md?plain=1#L1476-L1480 >>> [7] >>> https://github.com/apache/iceberg/blob/121c73fcdcdc7d851ce65634e92fd2a5dc6c3254/open-api/rest-catalog-open-api.yaml#L4280-L4336 >>> [8] >>> https://github.com/apache/iceberg/blob/121c73fcdcdc7d851ce65634e92fd2a5dc6c3254/open-api/rest-catalog-open-api.yaml#L5367-L5376 >>> [9] >>> https://docs.google.com/document/d/17PBhJ0IBxHxMKvCW6CstGOp7cZnboMDdpO6BCPO2kmA/edit?usp=sharing >>> >>>
