RussellSpitzer commented on code in PR #12228:
URL: https://github.com/apache/iceberg/pull/12228#discussion_r2363214848
##########
api/src/main/java/org/apache/iceberg/catalog/Catalog.java:
##########
@@ -344,6 +344,25 @@ default void invalidateTable(TableIdentifier identifier) {}
* @throws AlreadyExistsException if the table already exists in the catalog.
*/
default Table registerTable(TableIdentifier identifier, String
metadataFileLocation) {
+ return registerTable(
+ identifier, metadataFileLocation, false /* register only if it does
not exist */);
+ }
+
+ /**
+ * Register a table with the catalog, optionally overwrite existing table
metadata.
+ *
+ * <p><strong>Note:</strong> Overwriting an existing table may result in the
change of table UUID,
+ * to match the one in the metadata file.
+ *
+ * @param identifier a table identifier
+ * @param metadataFileLocation the location of a metadata file
+ * @param overwrite if true, overwrite the existing table with provided
metadata
+ * @return a Table instance
+ * @throws AlreadyExistsException if the table already exists in the catalog
and overwrite is
+ * false.
+ */
+ default Table registerTable(
+ TableIdentifier identifier, String metadataFileLocation, boolean
overwrite) {
throw new UnsupportedOperationException("Registering tables is not
supported");
Review Comment:
I think you are right here, let's just keep it this way (clean it up in 2.0)
--
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]