morningman commented on code in PR #18778:
URL: https://github.com/apache/doris/pull/18778#discussion_r1169716052


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/CreateCatalogStmt.java:
##########
@@ -32,24 +32,30 @@
 import com.google.common.base.Strings;
 import com.google.common.collect.Maps;
 
+import java.time.LocalDateTime;
+import java.time.ZoneId;
 import java.util.Map;
 
 /**
  * Statement for create a new catalog.
  */
 public class CreateCatalogStmt extends DdlStmt {
+    public static final String CREATE_TIME_PROP = "create_time";
     private final boolean ifNotExists;
     private final String catalogName;
     private final String resource;
+    private final String comment;
     private final Map<String, String> properties;
 
     /**
      * Statement for create a new catalog.
      */
-    public CreateCatalogStmt(boolean ifNotExists, String catalogName, String 
resource, Map<String, String> properties) {
+    public CreateCatalogStmt(boolean ifNotExists, String catalogName, String 
resource, Map<String, String> properties,
+            String comment) {
         this.ifNotExists = ifNotExists;
         this.catalogName = catalogName;
         this.resource = resource == null ? "" : resource;
+        this.comment = comment == null ? "" : comment;

Review Comment:
   Strings.nullToEmpty()



##########
fe/fe-core/src/main/java/org/apache/doris/analysis/AlterCatalogPropertyStmt.java:
##########
@@ -36,17 +36,23 @@
  */
 public class AlterCatalogPropertyStmt extends DdlStmt {
     private final String catalogName;
+    private final String comment;
     private final Map<String, String> newProperties;
 
     public AlterCatalogPropertyStmt(String catalogName, Map<String, String> 
newProperties) {
         this.catalogName = catalogName;
         this.newProperties = newProperties;
+        this.comment = newProperties.getOrDefault("comment", null);

Review Comment:
   better use `""`, not `null`



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to