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


##########
catalogs/catalog-lakehouse-generic/src/main/java/org/apache/gravitino/catalog/lakehouse/lance/LanceTableOperations.java:
##########
@@ -263,6 +264,18 @@ Table createTableInternal(
           ident, columns, comment, properties, partitions, distribution, 
sortOrders, indexes);
     }
 
+    // Check whether it's a create empty table operation.
+    boolean createEmpty =
+        
Optional.ofNullable(properties.get(LanceConstants.LANCE_TABLE_CREATE_EMPTY))
+            .map(Boolean::parseBoolean)
+            .orElse(false);
+    if (createEmpty) {
+      // For create empty table, we just create the table metadata in 
Gravitino without creating
+      // the underlying Lance dataset.
+      return super.createTable(
+          ident, columns, comment, properties, partitions, distribution, 
sortOrders, indexes);

Review Comment:
   `tableLocation` is not required for users who call the API, but it's 
required for the server. If it's not set by users, the implementation should 
decide it. 



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