This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 0069e2f2146 [branch-2.1] do not fallbacl to origin planner for call
stmt (#41263)
0069e2f2146 is described below
commit 0069e2f21464b0a045e5f78fcb954bbea926cc67
Author: Mingyu Chen <[email protected]>
AuthorDate: Wed Sep 25 14:30:56 2024 +0800
[branch-2.1] do not fallbacl to origin planner for call stmt (#41263)
`CALL xxx` statement is not supported by old planner.
And if fallback, the error message will be confused.
---
.../org/apache/doris/nereids/trees/plans/commands/CallCommand.java | 2 +-
.../suites/external_table_p0/jdbc/test_jdbc_call.groovy | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CallCommand.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CallCommand.java
index 81d950eab6a..1508fc4a3d5 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CallCommand.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CallCommand.java
@@ -33,7 +33,7 @@ import java.util.Objects;
/**
* call func()
*/
-public class CallCommand extends Command implements ForwardWithSync {
+public class CallCommand extends Command implements ForwardWithSync,
NotAllowFallback {
public static final Logger LOG = LogManager.getLogger(CallCommand.class);
private final UnboundFunction unboundFunction;
diff --git
a/regression-test/suites/external_table_p0/jdbc/test_jdbc_call.groovy
b/regression-test/suites/external_table_p0/jdbc/test_jdbc_call.groovy
index bb9e39562cf..aa1b1736cfd 100644
--- a/regression-test/suites/external_table_p0/jdbc/test_jdbc_call.groovy
+++ b/regression-test/suites/external_table_p0/jdbc/test_jdbc_call.groovy
@@ -102,6 +102,13 @@ suite("test_jdbc_call",
"p0,external,doris,external_docker,external_docker_doris
order_qt_sql6 """select * from
${catalog_name}.${internal_db_name}.${internal_tbl_name2}"""
order_qt_sql7 """select * from
internal.${internal_db_name}.${internal_tbl_name2}"""
+ // test not fallback
+ // if fallback, the error msg will be: Syntax error: xxx
+ test {
+ sql """call execute_stmt("${catalog_name}", "insert into
${internal_db_name}.${internal_tbl_name2} value (5, 6), (7, 8)")"""
+ exception """Failed to execute stmt"""
+ }
+
// test priv
// only user with load priv can execute call
String user1 = "normal_jdbc_user";
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]