diqiu50 commented on code in PR #7317:
URL: https://github.com/apache/gravitino/pull/7317#discussion_r2155951171


##########
trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/metadata/GravitinoCatalog.java:
##########
@@ -113,28 +163,63 @@ public String getRequiredProperty(String name) throws 
Exception {
     return value;
   }
 
+  /**
+   * Retrieves the properties of the catalog.
+   *
+   * @return the properties of the catalog
+   */
   @JsonProperty
   public Map<String, String> getProperties() {
     return properties;
   }
 
+  /**
+   * Retrieves the last modified time of the catalog.
+   *
+   * @return the last modified time of the catalog
+   */
   @JsonProperty
   public long getLastModifiedTime() {
     return lastModifiedTime;
   }
 
+  /**
+   * Converts a Gravitino catalog to a JSON string.
+   *
+   * @param catalog the Gravitino catalog
+   * @return the JSON string
+   * @throws JsonProcessingException if the catalog cannot be converted to a 
JSON string
+   */
   public static String toJson(GravitinoCatalog catalog) throws 
JsonProcessingException {
     return objectMapper.writeValueAsString(catalog);
   }
 
+  /**
+   * Converts a JSON string to a Gravitino catalog.
+   *
+   * @param jsonString the JSON string
+   * @return the Gravitino catalog
+   * @throws JsonProcessingException if the JSON string cannot be converted to 
a Gravitino catalog
+   */
   public static GravitinoCatalog fromJson(String jsonString) throws 
JsonProcessingException {
     return objectMapper.readValue(jsonString, GravitinoCatalog.class);
   }
 
+  /**
+   * Retrieves the region of the catalog.
+   *
+   * @return the region of the catalog
+   */
   public String getRegion() {
     return properties.getOrDefault(CLOUD_REGION_CODE, "");
   }
 
+  /**
+   * Checks if the catalog is in the same region as the specified region.
+   *
+   * @param region the region to check
+   * @return true if the catalog is in the same region as the specified 
region, false otherwise
+   */

Review Comment:
   That’s incorrect — the result is always true even when the region parameter 
is empty.



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