jerryshao commented on code in PR #9317:
URL: https://github.com/apache/gravitino/pull/9317#discussion_r2587761097


##########
server/src/main/java/org/apache/gravitino/server/web/rest/PartitionOperations.java:
##########
@@ -180,19 +180,18 @@ public Response addPartitions(
       @PathParam("schema") @AuthorizationMetadata(type = 
Entity.EntityType.SCHEMA) String schema,
       @PathParam("table") @AuthorizationMetadata(type = 
Entity.EntityType.TABLE) String table,
       AddPartitionsRequest request) {
-    LOG.info(
-        "Received add {} partition(s) request for table {}.{}.{}.{} ",
-        request.getPartitions().length,
-        metalake,
-        catalog,
-        schema,
-        table);
-    Preconditions.checkArgument(
-        request.getPartitions().length == 1, "Only one partition is 
supported");
-
-    request.validate();
-
     try {
+      request.validate();
+
+      LOG.info(
+          "Received add {} partition(s) request for table {}.{}.{}.{} ",
+          request.getPartitions().length,
+          metalake,
+          catalog,
+          schema,
+          table);
+      Preconditions.checkArgument(
+          request.getPartitions().length == 1, "Only one partition is 
supported");

Review Comment:
   Hi @HarshMehta112, I don't quite understand what you're actually fixing and 
what the issue is here. Seems like you just changed the ordering of the code, 
does it fix anything?



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