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


##########
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:
   If neither the schema nor the catalog specifies a location, then 
`createEmptyTable` request must include a `location`; otherwise, an error will 
occur. Do I understand this correctly?



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