morrySnow commented on code in PR #23485:
URL: https://github.com/apache/doris/pull/23485#discussion_r1329730072


##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -101,6 +136,14 @@ planType
     | ALL // default type
     ;
 
+mergeType : APPEND | DELETE | MERGE ;
+preFilterClause : PRECEDING FILTER expression ;
+deleteOnClause : DELETE ON expression ;
+sequenceColClause : ORDER BY identifier ;
+colFromPath : COLUMNS FROM PATH AS identifierList ;
+colMappingList : SET LEFT_PAREN mappingSet+=mappingExpr (COMMA 
mappingSet+=mappingExpr)* RIGHT_PAREN ;
+mappingExpr: (mappingCol=identifier EQ expression) ;

Review Comment:
   format should universal with other statement, for example:
   ```
   mergeType
       : APPEND
       | DELETE
       | MERGE
       ;
   
   preFilterClause
       : PRECEDING FILTER expression
       ;
   ```



##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -117,6 +160,23 @@ withRemoteStorageSystem
         RIGHT_PAREN)?
     ;
 
+resourceDesc : WITH RESOURCE resourceName=identifierOrText (LEFT_PAREN 
propertyItemList RIGHT_PAREN)? ;
+
+mysqlDataDesc
+    : DATA (LOCAL booleanValue)?
+    INFILE filePath=STRING_LITERAL
+    INTO TABLE tableName=multipartIdentifier
+    (PARTITION partition=identifierList)?
+    (COLUMNS TERMINATED BY comma=STRING_LITERAL)?
+    (LINES TERMINATED BY separator=STRING_LITERAL)?
+    (skipLines)?
+    (columns=identifierList)?
+    (colMappingList)?
+    (propertyClause)?
+    ;

Review Comment:
   ```suggestion
       : DATA (LOCAL booleanValue)?
           INFILE filePath=STRING_LITERAL
           INTO TABLE tableName=multipartIdentifier
           (PARTITION partition=identifierList)?
           (COLUMNS TERMINATED BY comma=STRING_LITERAL)?
           (LINES TERMINATED BY separator=STRING_LITERAL)?
           (skipLines)?
           (columns=identifierList)?
           (colMappingList)?
           (propertyClause)?
       ;
   ```



##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -117,6 +160,23 @@ withRemoteStorageSystem
         RIGHT_PAREN)?
     ;
 
+resourceDesc : WITH RESOURCE resourceName=identifierOrText (LEFT_PAREN 
propertyItemList RIGHT_PAREN)? ;

Review Comment:
   ditto



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/LoadCommand.java:
##########
@@ -0,0 +1,438 @@
+// 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.nereids.trees.plans.commands;
+
+import org.apache.doris.analysis.BulkLoadDataDesc;
+import org.apache.doris.analysis.BulkStorageDesc;
+import org.apache.doris.catalog.Column;
+import org.apache.doris.catalog.OlapTable;
+import org.apache.doris.catalog.TableIf;
+import org.apache.doris.common.AnalysisException;
+import org.apache.doris.common.ErrorCode;
+import org.apache.doris.common.NereidsException;
+import org.apache.doris.common.UserException;
+import org.apache.doris.common.profile.Profile;
+import org.apache.doris.datasource.property.constants.S3Properties;
+import org.apache.doris.load.loadv2.LoadTask;
+import org.apache.doris.nereids.analyzer.UnboundAlias;
+import org.apache.doris.nereids.analyzer.UnboundOlapTableSink;
+import org.apache.doris.nereids.analyzer.UnboundSlot;
+import org.apache.doris.nereids.analyzer.UnboundStar;
+import org.apache.doris.nereids.analyzer.UnboundTVFRelation;
+import org.apache.doris.nereids.trees.expressions.CaseWhen;
+import org.apache.doris.nereids.trees.expressions.EqualTo;
+import org.apache.doris.nereids.trees.expressions.Expression;
+import org.apache.doris.nereids.trees.expressions.NamedExpression;
+import org.apache.doris.nereids.trees.expressions.Properties;
+import org.apache.doris.nereids.trees.expressions.StatementScopeIdGenerator;
+import org.apache.doris.nereids.trees.expressions.WhenClause;
+import org.apache.doris.nereids.trees.expressions.literal.TinyIntLiteral;
+import org.apache.doris.nereids.trees.plans.Explainable;
+import org.apache.doris.nereids.trees.plans.Plan;
+import org.apache.doris.nereids.trees.plans.PlanType;
+import org.apache.doris.nereids.trees.plans.logical.LogicalCheckPolicy;
+import org.apache.doris.nereids.trees.plans.logical.LogicalFilter;
+import org.apache.doris.nereids.trees.plans.logical.LogicalPlan;
+import org.apache.doris.nereids.trees.plans.logical.LogicalProject;
+import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor;
+import org.apache.doris.nereids.util.ExpressionUtils;
+import org.apache.doris.nereids.util.RelationUtil;
+import org.apache.doris.qe.ConnectContext;
+import org.apache.doris.qe.QueryStateException;
+import org.apache.doris.qe.StmtExecutor;
+import org.apache.doris.tablefunction.ExternalFileTableValuedFunction;
+import org.apache.doris.tablefunction.HdfsTableValuedFunction;
+import org.apache.doris.tablefunction.S3TableValuedFunction;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.VerifyException;
+import com.google.common.collect.ImmutableList;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.TreeMap;
+
+/**
+ * export table
+ */
+public class LoadCommand extends Command implements ForwardWithSync, 
Explainable {

Review Comment:
   if it is a todo, remove from this PR, and add back when u real need it



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