You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/04/29 02:30:00 UTC

[GitHub] [incubator-doris] imay commented on a change in pull request #1067: Support insert values

imay commented on a change in pull request #1067: Support insert values
URL: https://github.com/apache/incubator-doris/pull/1067#discussion_r279226906
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/InsertStmt.java
 ##########
 @@ -363,10 +355,69 @@ public void analyzeSubquery(Analyzer analyzer) throws UserException {
             }
         }
 
+        // parse query statement
+        queryStmt.setFromInsert(true);
+        queryStmt.analyze(analyzer);
+
+        // check if size of select item equal with columns mentioned in statement
+        if (mentionedColumns.size() != queryStmt.getResultExprs().size()) {
 
 Review comment:
   These two checks are not the same. this checks if the number of query statement's result is equal with number of columns user assigned. And `checkColumnConverage` means to check if user assigned columns can covert the columns of target table.  

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org