This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 316223ef34 [fix](planner) forbidden query in insert value list (#19493)
316223ef34 is described below

commit 316223ef34c714c735757c5bf9dabda509771af7
Author: LiBinfeng <46676950+libinfeng...@users.noreply.github.com>
AuthorDate: Fri May 12 19:46:19 2023 +0800

    [fix](planner) forbidden query in insert value list (#19493)
---
 .../src/main/java/org/apache/doris/analysis/NativeInsertStmt.java      | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/NativeInsertStmt.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/NativeInsertStmt.java
index 035c3e0bb2..19899ad915 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/NativeInsertStmt.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/NativeInsertStmt.java
@@ -640,6 +640,9 @@ public class NativeInsertStmt extends InsertStmt {
                 }
                 expr = new 
StringLiteral(targetColumns.get(i).getDefaultValue());
             }
+            if (expr instanceof Subquery) {
+                throw new AnalysisException("Insert values can not be query");
+            }
 
             expr.analyze(analyzer);
 


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

Reply via email to