gaborkaszab commented on code in PR #13801:
URL: https://github.com/apache/iceberg/pull/13801#discussion_r2285030317
##########
api/src/main/java/org/apache/iceberg/catalog/Catalog.java:
##########
@@ -325,6 +326,47 @@ default boolean dropTable(TableIdentifier identifier) {
*/
Table loadTable(TableIdentifier identifier);
+ /**
+ * Computes the eTag of a given table.
+ *
+ * <p>This fetches the up-to-date eTag for a given table identifier</p>
+ *
+ * @param identifier the table identifier
+ * @return the eTag as a type 5 uuid or null if the eTag could not be
computed
+ */
+ default UUID getTableETag(TableIdentifier identifier) {
Review Comment:
Hi @henrib ,
I've been following this PR and the related issue also, and I see that you
introduced some APIs for exposing ETags on the Catalog interface. I think at
this point we should discuss the design in general because this goes somewhat
against what the relevant proposal has for REST catalog. A [relevant
comment](https://github.com/apache/iceberg/issues/13800#issuecomment-3196775991)
I left on the issue.
I think I went through the same thought process as you, but in general, when
I was designing the same functionality on the REST catalog, I was strongly
advised not to expose the ETags to the clients of the catalogs. As opposed to
this, the design we went for is that make the caching of tables and the
freshness-aware loading to happen seamlessly to the clients and be embedded
into the REST Catalog implementation. I believe, a similar implementation for
HiveCatalog would also make sense, but for that there might be some
pre-requisites to take care. Please check the comment I wrote on the issue, and
also [the
proposal](https://docs.google.com/document/d/1rnVSP_iv2I47giwfAe-Z3DYhKkKwWCVvCkC9rEvtaLA/edit?tab=t.0#heading=h.5voryi2hj0go)
I had for REST catalog.
But in general, Iceberg API changes like this should go through as an
[Improvement
Proposal](https://iceberg.apache.org/contribute/?h=proposal#apache-iceberg-improvement-proposals)
with a design doc, official voting and such.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]