Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.apache.doris.analysis.NullLiteral;
import org.apache.doris.analysis.OutFileClause;
import org.apache.doris.analysis.PartitionNames;
import org.apache.doris.analysis.PlaceHolderExpr;
import org.apache.doris.analysis.PrepareStmt;
import org.apache.doris.analysis.PrepareStmt.PreparedType;
import org.apache.doris.analysis.Queriable;
Expand Down Expand Up @@ -350,6 +351,9 @@ public static InternalService.PDataRow getRowStringValue(List<Expr> cols,
}
InternalService.PDataRow.Builder row = InternalService.PDataRow.newBuilder();
for (Expr expr : cols) {
if (expr instanceof PlaceHolderExpr) {
expr = ((PlaceHolderExpr) expr).getLiteral();
}
if (!expr.isLiteralOrCastExpr()) {
throw new UserException(
"do not support non-literal expr in transactional insert operation: " + expr.toSql());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ suite("insert_group_commit_with_prepare_stmt") {
);
"""

sql """ set enable_insert_strict = false; """

// 1. insert into
def insert_stmt = prepareStatement """ INSERT INTO ${table} VALUES(?, ?, ?) """
assertEquals(com.mysql.cj.jdbc.ServerPreparedStatement, insert_stmt.class)
Expand Down Expand Up @@ -212,8 +210,6 @@ suite("insert_group_commit_with_prepare_stmt") {
);
"""

sql """ set enable_insert_strict = false; """

// 1. insert into
def insert_stmt = prepareStatement """ INSERT INTO ${table} VALUES(?, ?, ?) """
assertEquals(com.mysql.cj.jdbc.ServerPreparedStatement, insert_stmt.class)
Expand Down