jerryshao commented on code in PR #9463:
URL: https://github.com/apache/gravitino/pull/9463#discussion_r2609853153
##########
catalogs/catalog-lakehouse-generic/src/main/java/org/apache/gravitino/catalog/lakehouse/lance/LanceTableOperations.java:
##########
@@ -259,8 +260,15 @@ Table createTableInternal(
throws NoSuchSchemaException, TableAlreadyExistsException {
if (register) {
+ // If this is a register operation, it should be a external table.
+ Map<String, String> stringStringMap = Maps.newHashMap(properties);
+ if (!properties.containsKey(Table.PROPERTY_EXTERNAL)
+ || !Boolean.parseBoolean(properties.get(Table.PROPERTY_EXTERNAL))) {
+ stringStringMap.put(Table.PROPERTY_EXTERNAL, "true");
+ }
Review Comment:
"register" and "external" are two different behavior definitions; we should
not use one definition to restrict another. The user can register an existing
table and let Gravitino manage the metadata and data.
Current "register" is a tricky code path only for Lance table, we haven't
received enough responses, and we're not clear how other formats define such
behaviors. We'd better leave as it is. We can always add this restriction later
on.
Another thing is that we should carefully think about such issues (like
location not found issue here, illegal location in another issue), is this
really an issue we should fix in the Gravitino side? How do we define our
border?
--
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]