mchades commented on code in PR #9016:
URL: https://github.com/apache/gravitino/pull/9016#discussion_r2493602917
##########
lance/lance-common/src/main/java/org/apache/gravitino/lance/common/ops/gravitino/GravitinoLanceNamespaceWrapper.java:
##########
@@ -631,36 +649,39 @@ public RegisterTableResponse registerTable(
NameIdentifier tableIdentifier =
NameIdentifier.of(nsId.levelAtListPos(1), nsId.levelAtListPos(2));
- // TODO Support real register API
- RegisterTableRequest.ModeEnum createMode =
- RegisterTableRequest.ModeEnum.fromValue(mode.toUpperCase());
- if (createMode == RegisterTableRequest.ModeEnum.CREATE
- && catalog.asTableCatalog().tableExists(tableIdentifier)) {
- throw LanceNamespaceException.conflict(
- "Table already exists: " + tableId,
- SchemaAlreadyExistsException.class.getSimpleName(),
- tableId,
- CommonUtil.formatCurrentStackTrace());
- }
-
- if (createMode == RegisterTableRequest.ModeEnum.OVERWRITE
- && catalog.asTableCatalog().tableExists(tableIdentifier)) {
- LOG.info("Overwriting existing table: {}", tableId);
- catalog.asTableCatalog().dropTable(tableIdentifier);
+ Table t = null;
+ try {
+ tableProperties.put("format", "lance");
Review Comment:
the `tableProperties` may be immutable, you should copy it first
--
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]