yuqi1129 commented on code in PR #9463:
URL: https://github.com/apache/gravitino/pull/9463#discussion_r2609715176


##########
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:
   Yeah, the location does not exist. So
   - We do check the existence of the location when registering, do we need to 
do it?
   - Do we need to remove the data directory when the user does not set 
`external = true` (default: false)? or just add some descrition in the document 
and let user decide whether to set the property `external`.
   - What the default value of `external` when registering a table? It seems 
that `true` would be a better one compared to the current value `false`.



-- 
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]

Reply via email to