nssalian commented on a change in pull request #3275:
URL: https://github.com/apache/iceberg/pull/3275#discussion_r727419187



##########
File path: core/src/main/java/org/apache/iceberg/jdbc/JdbcCatalog.java
##########
@@ -252,8 +267,34 @@ public void setConf(Configuration conf) {
 
   @Override
   public void createNamespace(Namespace namespace, Map<String, String> 
metadata) {
-    throw new UnsupportedOperationException("Cannot create namespace " + 
namespace +
-        ": createNamespace is not supported");
+    if (namespaceExists(namespace)) {
+      throw new AlreadyExistsException("Namespace already exists: %s", 
namespace);
+    }
+    String namespaceName = JdbcUtil.namespaceToString(namespace);

Review comment:
       Question: Doesn't checkStyleMain/checkStyleTest catch this? I didn't see 
a warning for this particular newline request.

##########
File path: core/src/main/java/org/apache/iceberg/jdbc/JdbcTableOperations.java
##########
@@ -207,7 +209,8 @@ protected String tableName() {
           table.put(JdbcUtil.TABLE_NAMESPACE, 
rs.getString(JdbcUtil.TABLE_NAMESPACE));
           table.put(JdbcUtil.TABLE_NAME, rs.getString(JdbcUtil.TABLE_NAME));
           table.put(JdbcUtil.METADATA_LOCATION, 
rs.getString(JdbcUtil.METADATA_LOCATION));
-          table.put(JdbcUtil.PREVIOUS_METADATA_LOCATION, 
rs.getString(JdbcUtil.PREVIOUS_METADATA_LOCATION));
+          table.put(JdbcUtil.PREVIOUS_METADATA_LOCATION,
+                  rs.getString(JdbcUtil.PREVIOUS_METADATA_LOCATION));

Review comment:
       Will change.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to