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


##########
fe/fe-core/src/main/java/org/apache/doris/persist/meta/PersistMetaModules.java:
##########
@@ -40,7 +40,8 @@ public class PersistMetaModules {
             "masterInfo", "frontends", "backends", "datasource", "db", 
"alterJob", "recycleBin",
             "globalVariable", "cluster", "broker", "resources", "exportJob", 
"backupHandler",
             "paloAuth", "transactionState", "colocateTableIndex", 
"routineLoadJobs", "loadJobV2", "smallFiles",
-            "plugins", "deleteHandler", "sqlBlockRule", "policy", 
"globalFunction", "workloadGroups",
+            "plugins", "deleteHandler", "sqlBlockRule", 
"authenticationIntegrations", "policy",

Review Comment:
   Why put it in the middle of modules?
   New module should be added to the end



##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -208,6 +208,8 @@ supportedCreateStatement
         LIKE existedTable=multipartIdentifier
         (WITH ROLLUP (rollupNames=identifierList)?)?                      
#createTableLike
     | CREATE ROLE (IF NOT EXISTS)? name=identifierOrText (COMMENT 
STRING_LITERAL)?    #createRole
+    | CREATE AUTHENTICATION INTEGRATION integrationName=identifier
+        WITH PROPERTIES LEFT_PAREN propertyItemList RIGHT_PAREN commentSpec?   
#createAuthenticationIntegration

Review Comment:
   And resuse `propertyClause`



##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -208,6 +208,8 @@ supportedCreateStatement
         LIKE existedTable=multipartIdentifier
         (WITH ROLLUP (rollupNames=identifierList)?)?                      
#createTableLike
     | CREATE ROLE (IF NOT EXISTS)? name=identifierOrText (COMMENT 
STRING_LITERAL)?    #createRole
+    | CREATE AUTHENTICATION INTEGRATION integrationName=identifier

Review Comment:
   missing "if not exists"



##########
fe/fe-core/src/main/java/org/apache/doris/persist/DropAuthenticationIntegrationOperationLog.java:
##########
@@ -27,43 +27,27 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-public class CloudMetaSyncPoint implements Writable {
-    @SerializedName(value = "committedVersion")
-    private long committedVersion;
+/**
+ * Drop log for AUTHENTICATION INTEGRATION.
+ */
+public class DropAuthenticationIntegrationOperationLog implements Writable {
+    @SerializedName(value = "integrationName")

Review Comment:
   short name: "in"



##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -208,6 +208,8 @@ supportedCreateStatement
         LIKE existedTable=multipartIdentifier
         (WITH ROLLUP (rollupNames=identifierList)?)?                      
#createTableLike
     | CREATE ROLE (IF NOT EXISTS)? name=identifierOrText (COMMENT 
STRING_LITERAL)?    #createRole
+    | CREATE AUTHENTICATION INTEGRATION integrationName=identifier
+        WITH PROPERTIES LEFT_PAREN propertyItemList RIGHT_PAREN commentSpec?   
#createAuthenticationIntegration

Review Comment:
   ```suggestion
          PROPERTIES LEFT_PAREN propertyItemList RIGHT_PAREN commentSpec?   
#createAuthenticationIntegration
   ```



##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -292,6 +294,10 @@ supportedAlterStatement
         properties=propertyClause?                                             
             #alterComputeGroup
     | ALTER CATALOG name=identifier SET PROPERTIES
         LEFT_PAREN propertyItemList RIGHT_PAREN                                
             #alterCatalogProperties        
+    | ALTER AUTHENTICATION INTEGRATION integrationName=identifier

Review Comment:
   How to delete an existing property?



##########
fe/fe-core/src/main/java/org/apache/doris/authentication/AuthenticationIntegrationMeta.java:
##########
@@ -0,0 +1,144 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.authentication;
+
+import org.apache.doris.common.DdlException;
+import org.apache.doris.common.io.Text;
+import org.apache.doris.common.io.Writable;
+import org.apache.doris.persist.gson.GsonUtils;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * Persistent metadata for AUTHENTICATION INTEGRATION.
+ */
+public class AuthenticationIntegrationMeta implements Writable {
+    public static final String TYPE_PROPERTY = "type";
+
+    @SerializedName(value = "name")
+    private String name;
+    @SerializedName(value = "type")
+    private String type;
+    @SerializedName(value = "properties")

Review Comment:
   use short name, such as "p"



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