This is an automated email from the ASF dual-hosted git repository. lide pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new 2a1bc567d65 [bug](prepared statement) fix some bugs in legacy planner (#36731) 2a1bc567d65 is described below commit 2a1bc567d65f947f0c793307e97656b04944581f Author: xy720 <22125576+xy...@users.noreply.github.com> AuthorDate: Mon Jun 24 16:41:25 2024 +0800 [bug](prepared statement) fix some bugs in legacy planner (#36731) --- .../org/apache/doris/analysis/BoolLiteral.java | 3 + .../org/apache/doris/analysis/DateLiteral.java | 3 + .../org/apache/doris/analysis/DecimalLiteral.java | 3 + .../org/apache/doris/analysis/FloatLiteral.java | 3 + .../java/org/apache/doris/analysis/IntLiteral.java | 3 + .../org/apache/doris/analysis/LargeIntLiteral.java | 3 + .../org/apache/doris/analysis/LiteralExpr.java | 1 + .../org/apache/doris/analysis/NullLiteral.java | 3 + .../org/apache/doris/analysis/StringLiteral.java | 3 + .../doris/rewrite/RewriteInPredicateRule.java | 10 +- .../data/prepared_stmt_p0/prepared_stmt.out | 52 +++--- .../prepared_stmt_p0/prepared_stmt_in_list.out | 129 ++++++++++++++ .../suites/prepared_stmt_p0/prepared_stmt.groovy | 23 +++ .../prepared_stmt_p0/prepared_stmt_in_list.groovy | 194 +++++++++++++++++++++ 14 files changed, 409 insertions(+), 24 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/BoolLiteral.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/BoolLiteral.java index c37a620235f..2221ae1de82 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/BoolLiteral.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/BoolLiteral.java @@ -86,6 +86,9 @@ public class BoolLiteral extends LiteralExpr { @Override public int compareLiteral(LiteralExpr expr) { + if (expr instanceof PlaceHolderExpr) { + return this.compareLiteral(((PlaceHolderExpr) expr).getLiteral()); + } if (expr instanceof NullLiteral) { return 1; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/DateLiteral.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/DateLiteral.java index a4908e37b2e..b68f3fc83da 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/DateLiteral.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/DateLiteral.java @@ -623,6 +623,9 @@ public class DateLiteral extends LiteralExpr { @Override public int compareLiteral(LiteralExpr expr) { + if (expr instanceof PlaceHolderExpr) { + return this.compareLiteral(((PlaceHolderExpr) expr).getLiteral()); + } if (expr instanceof NullLiteral) { return 1; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/DecimalLiteral.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/DecimalLiteral.java index f568cadd1d7..afbe6c0c6cd 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/DecimalLiteral.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/DecimalLiteral.java @@ -240,6 +240,9 @@ public class DecimalLiteral extends LiteralExpr { @Override public int compareLiteral(LiteralExpr expr) { + if (expr instanceof PlaceHolderExpr) { + return this.compareLiteral(((PlaceHolderExpr) expr).getLiteral()); + } if (expr instanceof NullLiteral) { return 1; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/FloatLiteral.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/FloatLiteral.java index 55925821bda..2eabd21c01f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/FloatLiteral.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/FloatLiteral.java @@ -117,6 +117,9 @@ public class FloatLiteral extends LiteralExpr { @Override public int compareLiteral(LiteralExpr expr) { + if (expr instanceof PlaceHolderExpr) { + return this.compareLiteral(((PlaceHolderExpr) expr).getLiteral()); + } if (expr instanceof NullLiteral) { return 1; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/IntLiteral.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/IntLiteral.java index dfefae8f7db..25f8ab753b2 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/IntLiteral.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/IntLiteral.java @@ -238,6 +238,9 @@ public class IntLiteral extends LiteralExpr { @Override public int compareLiteral(LiteralExpr expr) { + if (expr instanceof PlaceHolderExpr) { + return this.compareLiteral(((PlaceHolderExpr) expr).getLiteral()); + } if (expr instanceof NullLiteral) { return 1; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/LargeIntLiteral.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/LargeIntLiteral.java index c13bc9171c1..c72889b94b2 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/LargeIntLiteral.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/LargeIntLiteral.java @@ -171,6 +171,9 @@ public class LargeIntLiteral extends LiteralExpr { @Override public int compareLiteral(LiteralExpr expr) { + if (expr instanceof PlaceHolderExpr) { + return this.compareLiteral(((PlaceHolderExpr) expr).getLiteral()); + } if (expr instanceof NullLiteral) { return 1; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/LiteralExpr.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/LiteralExpr.java index 6ee4bd9a417..8d8815f90b2 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/LiteralExpr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/LiteralExpr.java @@ -344,6 +344,7 @@ public abstract class LiteralExpr extends Expr implements Comparable<LiteralExpr break; case 5: // MYSQL_TYPE_DOUBLE literalExpr = LiteralExpr.create("0", Type.DOUBLE); + literalExpr.setType(Type.DOUBLE); break; case 0: // MYSQL_TYPE_DECIMAL case 246: // MYSQL_TYPE_NEWDECIMAL diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/NullLiteral.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/NullLiteral.java index 79e1b247b8a..7d0e38c5b60 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/NullLiteral.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/NullLiteral.java @@ -85,6 +85,9 @@ public class NullLiteral extends LiteralExpr { @Override public int compareLiteral(LiteralExpr expr) { + if (expr instanceof PlaceHolderExpr) { + return this.compareLiteral(((PlaceHolderExpr) expr).getLiteral()); + } if (expr instanceof NullLiteral) { return 0; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/StringLiteral.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/StringLiteral.java index 0e0dbc81c47..67cf82cc1a0 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/StringLiteral.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/StringLiteral.java @@ -76,6 +76,9 @@ public class StringLiteral extends LiteralExpr { @Override public int compareLiteral(LiteralExpr expr) { + if (expr instanceof PlaceHolderExpr) { + return this.compareLiteral(((PlaceHolderExpr) expr).getLiteral()); + } if (expr instanceof NullLiteral) { return 1; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/rewrite/RewriteInPredicateRule.java b/fe/fe-core/src/main/java/org/apache/doris/rewrite/RewriteInPredicateRule.java index 3541690d002..be818d06523 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/rewrite/RewriteInPredicateRule.java +++ b/fe/fe-core/src/main/java/org/apache/doris/rewrite/RewriteInPredicateRule.java @@ -98,6 +98,9 @@ public class RewriteInPredicateRule implements ExprRewriteRule { // cannot be directly converted to LargeIntLiteral, so it is converted to decimal first. if (childExpr.getType().getPrimitiveType().isCharFamily() || childExpr.getType().isFloatingPointType()) { try { + if (childExpr instanceof PlaceHolderExpr) { + childExpr = ((PlaceHolderExpr) childExpr).getLiteral(); + } childExpr = (LiteralExpr) childExpr.castTo(Type.DECIMALV2); } catch (AnalysisException e) { if (ConnectContext.get() != null) { @@ -115,11 +118,10 @@ public class RewriteInPredicateRule implements ExprRewriteRule { // For example, 2.1 is converted to 2; // 3. childExpr is precisely converted to column type. For example, 2.0 is converted to 2. // In cases 1 and 2 above, childExpr should be discarded. - Expr tmpExpr = childExpr.castTo(columnType); - if (tmpExpr instanceof CastExpr && tmpExpr.getChild(0) instanceof PlaceHolderExpr) { - tmpExpr = ((PlaceHolderExpr) tmpExpr.getChild(0)).getLiteral().castTo(columnType); + if (childExpr instanceof PlaceHolderExpr) { + childExpr = ((PlaceHolderExpr) childExpr).getLiteral(); } - LiteralExpr newExpr = (LiteralExpr) tmpExpr; + LiteralExpr newExpr = (LiteralExpr) childExpr.castTo(columnType); if (childExpr.compareLiteral(newExpr) == 0) { isCast = true; newInList.add(newExpr); diff --git a/regression-test/data/prepared_stmt_p0/prepared_stmt.out b/regression-test/data/prepared_stmt_p0/prepared_stmt.out index 396ee931683..33381e327bf 100644 --- a/regression-test/data/prepared_stmt_p0/prepared_stmt.out +++ b/regression-test/data/prepared_stmt_p0/prepared_stmt.out @@ -1,30 +1,30 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -1231 119291.110000000 ddd laooq \N 2020-01-01 12:36:38 \N 1022-01-01 ["2022-01-01 11:30:38", "2022-01-01 11:30:38", "2022-01-01 11:30:38"] -1232 12222.991211350 xxx laooq 2023-01-02 2020-01-01 12:36:38 522.762 2022-01-01 ["2023-01-01 11:30:38", "2023-01-01 11:30:38"] -1233 1.392932911 yyy laooq 2024-01-02 2020-01-01 12:36:38 52.862 3022-01-01 ["2024-01-01 11:30:38", "2024-01-01 11:30:38", "2024-01-01 11:30:38"] -1234 12919291.129191137 xxddd laooq 2025-01-02 2020-01-01 12:36:38 552.872 4022-01-01 ["2025-01-01 11:30:38", "2025-01-01 11:30:38", "2025-01-01 11:30:38"] -1235 991129292901.111380000 dd \N 2120-01-02 2020-01-01 12:36:38 652.692 5022-01-01 [] -1236 100320.111390000 laa ddd laooq 2220-01-02 2020-01-01 12:36:38 2.7692 6022-01-01 [null] -1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] +1231 119291.110000000 ddd laooq \N 2020-01-01T12:36:38 \N 1022-01-01 ["2022-01-01 11:30:38", "2022-01-01 11:30:38", "2022-01-01 11:30:38"] +1232 12222.991211350 xxx laooq 2023-01-02 2020-01-01T12:36:38 522.762 2022-01-01 ["2023-01-01 11:30:38", "2023-01-01 11:30:38"] +1233 1.392932911 yyy laooq 2024-01-02 2020-01-01T12:36:38 52.862 3022-01-01 ["2024-01-01 11:30:38", "2024-01-01 11:30:38", "2024-01-01 11:30:38"] +1234 12919291.129191137 xxddd laooq 2025-01-02 2020-01-01T12:36:38 552.872 4022-01-01 ["2025-01-01 11:30:38", "2025-01-01 11:30:38", "2025-01-01 11:30:38"] +1235 991129292901.111380000 dd \N 2120-01-02 2020-01-01T12:36:38 652.692 5022-01-01 [] +1236 100320.111390000 laa ddd laooq 2220-01-02 2020-01-01T12:36:38 2.7692 6022-01-01 [null] +1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01T12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] -- !sql -- -1231 119291.110000000 ddd laooq \N 2020-01-01 12:36:38 \N 1022-01-01 ["2022-01-01 11:30:38", "2022-01-01 11:30:38", "2022-01-01 11:30:38"] -1232 12222.991211350 xxx laooq 2023-01-02 2020-01-01 12:36:38 522.762 2022-01-01 ["2023-01-01 11:30:38", "2023-01-01 11:30:38"] -1233 1.392932911 yyy laooq 2024-01-02 2020-01-01 12:36:38 52.862 3022-01-01 ["2024-01-01 11:30:38", "2024-01-01 11:30:38", "2024-01-01 11:30:38"] -1234 12919291.129191137 xxddd laooq 2025-01-02 2020-01-01 12:36:38 552.872 4022-01-01 ["2025-01-01 11:30:38", "2025-01-01 11:30:38", "2025-01-01 11:30:38"] -1235 991129292901.111380000 dd \N 2120-01-02 2020-01-01 12:36:38 652.692 5022-01-01 [] -1236 100320.111390000 laa ddd laooq 2220-01-02 2020-01-01 12:36:38 2.7692 6022-01-01 [null] -1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] +1231 119291.110000000 ddd laooq \N 2020-01-01T12:36:38 \N 1022-01-01 ["2022-01-01 11:30:38", "2022-01-01 11:30:38", "2022-01-01 11:30:38"] +1232 12222.991211350 xxx laooq 2023-01-02 2020-01-01T12:36:38 522.762 2022-01-01 ["2023-01-01 11:30:38", "2023-01-01 11:30:38"] +1233 1.392932911 yyy laooq 2024-01-02 2020-01-01T12:36:38 52.862 3022-01-01 ["2024-01-01 11:30:38", "2024-01-01 11:30:38", "2024-01-01 11:30:38"] +1234 12919291.129191137 xxddd laooq 2025-01-02 2020-01-01T12:36:38 552.872 4022-01-01 ["2025-01-01 11:30:38", "2025-01-01 11:30:38", "2025-01-01 11:30:38"] +1235 991129292901.111380000 dd \N 2120-01-02 2020-01-01T12:36:38 652.692 5022-01-01 [] +1236 100320.111390000 laa ddd laooq 2220-01-02 2020-01-01T12:36:38 2.7692 6022-01-01 [null] +1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01T12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] -- !select0 -- -1231 119291.110000000 ddd laooq \N 2020-01-01 12:36:38 \N 1022-01-01 ["2022-01-01 11:30:38", "2022-01-01 11:30:38", "2022-01-01 11:30:38"] +1231 119291.110000000 ddd laooq \N 2020-01-01T12:36:38 \N 1022-01-01 ["2022-01-01 11:30:38", "2022-01-01 11:30:38", "2022-01-01 11:30:38"] -- !select0 -- -1232 12222.991211350 xxx laooq 2023-01-02 2020-01-01 12:36:38 522.762 2022-01-01 ["2023-01-01 11:30:38", "2023-01-01 11:30:38"] +1232 12222.991211350 xxx laooq 2023-01-02 2020-01-01T12:36:38 522.762 2022-01-01 ["2023-01-01 11:30:38", "2023-01-01 11:30:38"] -- !select0 -- -1232 12222.991211350 xxx laooq 2023-01-02 2020-01-01 12:36:38 522.762 2022-01-01 ["2023-01-01 11:30:38", "2023-01-01 11:30:38"] +1232 12222.991211350 xxx laooq 2023-01-02 2020-01-01T12:36:38 522.762 2022-01-01 ["2023-01-01 11:30:38", "2023-01-01 11:30:38"] -- !select1 -- 646464 xxxx--- @@ -36,13 +36,13 @@ 787878 yyyy--- -- !select2 -- -1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] 1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] +1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01T12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] 1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01T12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] -- !select2 -- -1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] 1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] +1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01T12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] 1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01T12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] -- !select2 -- -1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] 1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01 12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] +1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01T12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] 1237 120939.111300000 a ddd laooq 2030-01-02 2020-01-01T12:36:38 22.822 7022-01-01 ["2025-01-01 11:30:38"] -- !select3 -- 1 1 user1 30 1234 12345 @@ -53,3 +53,15 @@ -- !select5 -- 1 +-- !select6 -- +2 1 user1 \N 1234.1111 xxxlalala + +-- !select7 -- +2 1 user1 \N 1111111 1111111 + +-- !select6_1 -- +2 1 user1 \N 1234.1111 xxxlalala + +-- !select7_1 -- +2 1 user1 \N 1111111 1111111 + diff --git a/regression-test/data/prepared_stmt_p0/prepared_stmt_in_list.out b/regression-test/data/prepared_stmt_p0/prepared_stmt_in_list.out new file mode 100644 index 00000000000..fa90a56523c --- /dev/null +++ b/regression-test/data/prepared_stmt_p0/prepared_stmt_in_list.out @@ -0,0 +1,129 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !sql -- +1 1300 55356821 15982329875 119291.110000000 abcd \N 2020-01-01T12:36:38 \N 1022-01-01T11:30:38 1022-01-01 +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 +6 1305 56054803 18031831909 100320.111390000 haha abcd 2220-01-02 2025-01-01T12:36:38 2.7692 6022-01-01T11:30:38 6022-01-01 +7 1306 56055112 13777918563 120939.111300000 a abcd 2030-01-02 2026-01-01T12:36:38 22.822 7022-01-01T11:30:38 7022-01-01 + +-- !stmt_read1_1 -- +1 1300 55356821 15982329875 119291.110000000 abcd \N 2020-01-01T12:36:38 \N 1022-01-01T11:30:38 1022-01-01 +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 + +-- !stmt_read1_2 -- +1 1300 55356821 15982329875 119291.110000000 abcd \N 2020-01-01T12:36:38 \N 1022-01-01T11:30:38 1022-01-01 +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 + +-- !stmt_read2_1 -- +1 1300 55356821 15982329875 119291.110000000 abcd \N 2020-01-01T12:36:38 \N 1022-01-01T11:30:38 1022-01-01 +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 + +-- !stmt_read2_2 -- +1 1300 55356821 15982329875 119291.110000000 abcd \N 2020-01-01T12:36:38 \N 1022-01-01T11:30:38 1022-01-01 +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 + +-- !stmt_read3_1 -- +1 1300 55356821 15982329875 119291.110000000 abcd \N 2020-01-01T12:36:38 \N 1022-01-01T11:30:38 1022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 +6 1305 56054803 18031831909 100320.111390000 haha abcd 2220-01-02 2025-01-01T12:36:38 2.7692 6022-01-01T11:30:38 6022-01-01 +7 1306 56055112 13777918563 120939.111300000 a abcd 2030-01-02 2026-01-01T12:36:38 22.822 7022-01-01T11:30:38 7022-01-01 + +-- !stmt_read3_2 -- +1 1300 55356821 15982329875 119291.110000000 abcd \N 2020-01-01T12:36:38 \N 1022-01-01T11:30:38 1022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 +6 1305 56054803 18031831909 100320.111390000 haha abcd 2220-01-02 2025-01-01T12:36:38 2.7692 6022-01-01T11:30:38 6022-01-01 +7 1306 56055112 13777918563 120939.111300000 a abcd 2030-01-02 2026-01-01T12:36:38 22.822 7022-01-01T11:30:38 7022-01-01 + +-- !stmt_read4_1 -- +1 1300 55356821 15982329875 119291.110000000 abcd \N 2020-01-01T12:36:38 \N 1022-01-01T11:30:38 1022-01-01 +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 + +-- !stmt_read4_2 -- +1 1300 55356821 15982329875 119291.110000000 abcd \N 2020-01-01T12:36:38 \N 1022-01-01T11:30:38 1022-01-01 +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 + +-- !stmt_read5_1 -- +1 1300 55356821 15982329875 119291.110000000 abcd \N 2020-01-01T12:36:38 \N 1022-01-01T11:30:38 1022-01-01 +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 + +-- !stmt_read6_1 -- +1 1300 55356821 15982329875 119291.110000000 abcd \N 2020-01-01T12:36:38 \N 1022-01-01T11:30:38 1022-01-01 +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +6 1305 56054803 18031831909 100320.111390000 haha abcd 2220-01-02 2025-01-01T12:36:38 2.7692 6022-01-01T11:30:38 6022-01-01 + +-- !stmt_read7_1 -- +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 +7 1306 56055112 13777918563 120939.111300000 a abcd 2030-01-02 2026-01-01T12:36:38 22.822 7022-01-01T11:30:38 7022-01-01 + +-- !stmt_read7_2 -- +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 +7 1306 56055112 13777918563 120939.111300000 a abcd 2030-01-02 2026-01-01T12:36:38 22.822 7022-01-01T11:30:38 7022-01-01 + +-- !stmt_read8_1 -- +1 1300 55356821 15982329875 119291.110000000 abcd \N 2020-01-01T12:36:38 \N 1022-01-01T11:30:38 1022-01-01 +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 + +-- !stmt_read8_2 -- +1 1300 55356821 15982329875 119291.110000000 abcd \N 2020-01-01T12:36:38 \N 1022-01-01T11:30:38 1022-01-01 +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 + +-- !stmt_read9_1 -- +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 +6 1305 56054803 18031831909 100320.111390000 haha abcd 2220-01-02 2025-01-01T12:36:38 2.7692 6022-01-01T11:30:38 6022-01-01 + +-- !stmt_read10_1 -- +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 +6 1305 56054803 18031831909 100320.111390000 haha abcd 2220-01-02 2025-01-01T12:36:38 2.7692 6022-01-01T11:30:38 6022-01-01 + +-- !stmt_read10_2 -- +2 1301 56052706 14285329801 12222.991211350 doris 2023-01-02 2021-01-01T12:36:38 522.762 2022-01-01T11:30:38 2022-01-01 +3 1302 55702967 17754445280 1.392932911 superman 2024-01-02 2022-01-01T12:36:38 52.862 3022-01-01T11:30:38 3022-01-01 +4 1303 56054326 15669391193 12919291.129191137 xxabcd 2025-01-02 2023-01-01T12:36:38 552.872 4022-01-01T11:30:38 4022-01-01 +5 1304 36548425 15229335116 991129292901.111380000 dd 2120-01-02 2024-01-01T12:36:38 652.692 5022-01-01T11:30:38 5022-01-01 +6 1305 56054803 18031831909 100320.111390000 haha abcd 2220-01-02 2025-01-01T12:36:38 2.7692 6022-01-01T11:30:38 6022-01-01 + diff --git a/regression-test/suites/prepared_stmt_p0/prepared_stmt.groovy b/regression-test/suites/prepared_stmt_p0/prepared_stmt.groovy index 8274eaa2f5f..5f6e870003c 100644 --- a/regression-test/suites/prepared_stmt_p0/prepared_stmt.groovy +++ b/regression-test/suites/prepared_stmt_p0/prepared_stmt.groovy @@ -163,6 +163,29 @@ suite("test_prepared_stmt", "nonConcurrent") { stmt_read = prepareStatement "SELECT 1" assertEquals(stmt_read.class, com.mysql.cj.jdbc.ServerPreparedStatement); qe_select5 stmt_read + + sql """insert into mytable1 values(2,1,'user1',null);""" + + sql "set experimental_enable_nereids_planner = false" + + stmt_read = prepareStatement "SELECT *, ? FROM (select *, ? from mytable1 where pv is null) AS `SpotfireCustomQuery1` WHERE 1 = 1" + assertEquals(stmt_read.class, com.mysql.cj.jdbc.ServerPreparedStatement); + stmt_read.setString(1, "xxxlalala") + stmt_read.setDouble(2, 1234.1111) + qe_select6 stmt_read + stmt_read.setString(1, "1111111") + stmt_read.setString(2, "1111111") + qe_select7 stmt_read + + sql "set experimental_enable_nereids_planner = true" + + stmt_read.setString(1, "xxxlalala") + stmt_read.setDouble(2, 1234.1111) + qe_select6_1 stmt_read + stmt_read.setString(1, "1111111") + stmt_read.setString(2, "1111111") + qe_select7_1 stmt_read + sql "set global enable_server_side_prepared_statement = false" } } diff --git a/regression-test/suites/prepared_stmt_p0/prepared_stmt_in_list.groovy b/regression-test/suites/prepared_stmt_p0/prepared_stmt_in_list.groovy new file mode 100644 index 00000000000..a35e5e35e7d --- /dev/null +++ b/regression-test/suites/prepared_stmt_p0/prepared_stmt_in_list.groovy @@ -0,0 +1,194 @@ +// 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. + +import java.math.BigDecimal; + +suite("test_prepared_stmt_in_list", "nonConcurrent") { + def tableName = "tbl_prepared_stmt_in_list" + def user = context.config.jdbcUser + def password = context.config.jdbcPassword + def url = context.config.jdbcUrl + "&useServerPrepStmts=true" + sql "set global enable_server_side_prepared_statement = true" + def result1 = connect(user=user, password=password, url=url) { + sql """DROP TABLE IF EXISTS ${tableName} """ + sql """ + CREATE TABLE IF NOT EXISTS ${tableName} ( + `k1` tinyint NULL COMMENT "", + `k2` smallint NULL COMMENT "", + `k3` int NULL COMMENT "", + `k4` bigint NULL COMMENT "", + `k5` decimalv3(27, 9) NULL COMMENT "", + `k6` varchar(30) NULL COMMENT "", + `k7` date NULL COMMENT "", + `k8` datetime NULL COMMENT "", + `k9` float NULL COMMENT "", + `k10` datetimev2 NULL COMMENT "", + `k11` datev2 NULL COMMENT "" + ) ENGINE=OLAP + DUPLICATE KEY(`k1`, `k2`, `k3`) + DISTRIBUTED BY HASH(`k1`, `k2`, `k3`) BUCKETS 1 + PROPERTIES ( + "replication_allocation" = "tag.location.default: 1", + "light_schema_change" = "true", + "storage_format" = "V2" + ) + """ + + sql """ INSERT INTO ${tableName} VALUES(1, 1300, 55356821, 15982329875, 119291.11, "abcd", null, "2020-01-01 12:36:38", null, "1022-01-01 11:30:38", "1022-01-01 11:30:38") """ + sql """ INSERT INTO ${tableName} VALUES(2, 1301, 56052706, 14285329801, 12222.99121135, "doris", "2023-01-02", "2021-01-01 12:36:38", 522.762, "2022-01-01 11:30:38", "2022-01-01 11:30:38") """ + sql """ INSERT INTO ${tableName} VALUES(3, 1302, 55702967, 17754445280, 1.392932911, "superman", "2024-01-02", "2022-01-01 12:36:38", 52.862, "3022-01-01 11:30:38", "3022-01-01 11:30:38") """ + sql """ INSERT INTO ${tableName} VALUES(4, 1303, 56054326, 15669391193, 12919291.129191137, "xxabcd", "2025-01-02", "2023-01-01 12:36:38", 552.872, "4022-01-01 11:30:38", "4022-01-01 11:30:38") """ + sql """ INSERT INTO ${tableName} VALUES(5, 1304, 36548425, 15229335116, 991129292901.11138, "dd", "2120-01-02", "2024-01-01 12:36:38", 652.692, "5022-01-01 11:30:38", "5022-01-01 11:30:38") """ + sql """ INSERT INTO ${tableName} VALUES(6, 1305, 56054803, 18031831909, 100320.11139, "haha abcd", "2220-01-02", "2025-01-01 12:36:38", 2.7692, "6022-01-01 11:30:38", "6022-01-01 11:30:38") """ + sql """ INSERT INTO ${tableName} VALUES(7, 1306, 56055112, 13777918563, 120939.11130, "a abcd", "2030-01-02", "2026-01-01 12:36:38", 22.822, "7022-01-01 11:30:38", "7022-01-01 11:30:38") """ + sql """sync""" + + qt_sql """select * from ${tableName} order by 1, 2, 3""" + + java.text.SimpleDateFormat formater = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + def stmt_read1 = prepareStatement "select * from ${tableName} WHERE `k1` IN (?, ?, ?, ?, ?) order by 1" + stmt_read1.setByte(1, (byte) 1) + stmt_read1.setByte(2, (byte) 2) + stmt_read1.setByte(3, (byte) 3) + stmt_read1.setByte(4, (byte) 4) + stmt_read1.setByte(5, (byte) 5) + qe_stmt_read1_1 stmt_read1 + + stmt_read1.setString(1, '1') + stmt_read1.setString(2, '2') + stmt_read1.setString(3, '3') + stmt_read1.setString(4, '4') + stmt_read1.setString(5, '5') + qe_stmt_read1_2 stmt_read1 + + def stmt_read2 = prepareStatement "select * from ${tableName} WHERE `k2` IN (?, ?, ?, ?, ?) order by 1" + stmt_read2.setShort(1, (short) 1300) + stmt_read2.setShort(2, (short) 1301) + stmt_read2.setShort(3, (short) 1302) + stmt_read2.setShort(4, (short) 1303) + stmt_read2.setShort(5, (short) 1304) + qe_stmt_read2_1 stmt_read2 + + stmt_read2.setString(1, '1300') + stmt_read2.setString(2, '1301') + stmt_read2.setString(3, '1302') + stmt_read2.setString(4, '1303') + stmt_read2.setString(5, '1304') + qe_stmt_read2_2 stmt_read2 + + def stmt_read3 = prepareStatement "select * from ${tableName} WHERE `k3` IN (?, ?, ?, ?, ?) order by 1" + stmt_read3.setInt(1, 55356821) + stmt_read3.setInt(2, 56054326) + stmt_read3.setInt(3, 36548425) + stmt_read3.setInt(4, 56054803) + stmt_read3.setInt(5, 56055112) + qe_stmt_read3_1 stmt_read3 + + stmt_read3.setString(1, '55356821') + stmt_read3.setString(2, '56054326') + stmt_read3.setString(3, '36548425') + stmt_read3.setString(4, '56054803') + stmt_read3.setString(5, '56055112') + qe_stmt_read3_2 stmt_read3 + + def stmt_read4 = prepareStatement "select * from ${tableName} WHERE `k4` IN (?, ?, ?, ?, ?) order by 1" + stmt_read4.setLong(1, 15982329875) + stmt_read4.setLong(2, 14285329801) + stmt_read4.setLong(3, 17754445280) + stmt_read4.setLong(4, 15669391193) + stmt_read4.setLong(5, 15229335116) + qe_stmt_read4_1 stmt_read4 + + stmt_read4.setString(1, '15982329875') + stmt_read4.setString(2, '14285329801') + stmt_read4.setString(3, '17754445280') + stmt_read4.setString(4, '15669391193') + stmt_read4.setString(5, '15229335116') + qe_stmt_read4_2 stmt_read4 + + def stmt_read5 = prepareStatement "select * from ${tableName} WHERE `k5` IN (?, ?, ?, ?, ?) order by 1" + stmt_read5.setBigDecimal(1, new BigDecimal("119291.11")) + stmt_read5.setBigDecimal(2, new BigDecimal("12222.99121135")) + stmt_read5.setBigDecimal(3, new BigDecimal("1.392932911")) + stmt_read5.setBigDecimal(4, new BigDecimal("12919291.129191137")) + stmt_read5.setBigDecimal(5, new BigDecimal("991129292901.11138")) + qe_stmt_read5_1 stmt_read5 + + def stmt_read6 = prepareStatement "select * from ${tableName} WHERE `k6` IN (?, ?, ?, ?, ?) order by 1" + stmt_read6.setString(1, 'abcd') + stmt_read6.setString(2, 'doris') + stmt_read6.setString(3, 'superman') + stmt_read6.setString(4, 'xxabcd') + stmt_read6.setString(5, 'haha abcd') + qe_stmt_read6_1 stmt_read6 + + def stmt_read7 = prepareStatement "select * from ${tableName} WHERE `k7` IN (?, ?, ?, ?, ?) order by 1" + stmt_read7.setDate(1, java.sql.Date.valueOf("2023-01-02")) + stmt_read7.setDate(2, java.sql.Date.valueOf("2024-01-02")) + stmt_read7.setDate(3, java.sql.Date.valueOf("2025-01-02")) + stmt_read7.setDate(4, java.sql.Date.valueOf("2120-01-02")) + stmt_read7.setDate(5, java.sql.Date.valueOf("2030-01-02")) + qe_stmt_read7_1 stmt_read7 + + stmt_read7.setString(1, '2023-01-02') + stmt_read7.setString(2, '2024-01-02') + stmt_read7.setString(3, '2025-01-02') + stmt_read7.setString(4, '2120-01-02') + stmt_read7.setString(5, '2030-01-02') + qe_stmt_read7_2 stmt_read7 + + def stmt_read8 = prepareStatement "select * from ${tableName} WHERE `k8` IN (?, ?, ?, ?, ?) order by 1" + stmt_read8.setTimestamp(1, new java.sql.Timestamp(formater.parse("2020-01-01 12:36:38").getTime())) + stmt_read8.setTimestamp(2, new java.sql.Timestamp(formater.parse("2021-01-01 12:36:38").getTime())) + stmt_read8.setTimestamp(3, new java.sql.Timestamp(formater.parse("2022-01-01 12:36:38").getTime())) + stmt_read8.setTimestamp(4, new java.sql.Timestamp(formater.parse("2023-01-01 12:36:38").getTime())) + stmt_read8.setTimestamp(5, new java.sql.Timestamp(formater.parse("2024-01-01 12:36:38").getTime())) + qe_stmt_read8_1 stmt_read8 + + stmt_read8.setString(1, '2020-01-01 12:36:38') + stmt_read8.setString(2, '2021-01-01 12:36:38') + stmt_read8.setString(3, '2022-01-01 12:36:38') + stmt_read8.setString(4, '2023-01-01 12:36:38') + stmt_read8.setString(5, '2024-01-01 12:36:38') + qe_stmt_read8_2 stmt_read8 + + def stmt_read9 = prepareStatement "select * from ${tableName} WHERE `k9` IN (?, ?, ?, ?, ?) order by 1" + stmt_read9.setFloat(1, 522.762) + stmt_read9.setFloat(2, 52.862) + stmt_read9.setFloat(3, 552.872) + stmt_read9.setFloat(4, 652.692) + stmt_read9.setFloat(5, 2.7692) + qe_stmt_read9_1 stmt_read9 + + def stmt_read10 = prepareStatement "select * from ${tableName} WHERE `k10` IN (?, ?, ?, ?, ?) order by 1" + stmt_read10.setTimestamp(1, new java.sql.Timestamp(formater.parse("2022-01-01 11:30:38").getTime())) + stmt_read10.setTimestamp(2, new java.sql.Timestamp(formater.parse("3022-01-01 11:30:38").getTime())) + stmt_read10.setTimestamp(3, new java.sql.Timestamp(formater.parse("4022-01-01 11:30:38").getTime())) + stmt_read10.setTimestamp(4, new java.sql.Timestamp(formater.parse("5022-01-01 11:30:38").getTime())) + stmt_read10.setTimestamp(5, new java.sql.Timestamp(formater.parse("6022-01-01 11:30:38").getTime())) + qe_stmt_read10_1 stmt_read10 + + stmt_read10.setString(1, '2022-01-01 11:30:38') + stmt_read10.setString(2, '3022-01-01 11:30:38') + stmt_read10.setString(3, '4022-01-01 11:30:38') + stmt_read10.setString(4, '5022-01-01 11:30:38') + stmt_read10.setString(5, '6022-01-01 11:30:38') + qe_stmt_read10_2 stmt_read10 + } + sql "set global enable_server_side_prepared_statement = false" +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org