[fix](group commit) Fix prepare stmt setNull return too many filtered rows error (#38262) (#38276)

Pick https://github.com/apache/doris/pull/38262
This commit is contained in:
meiyi
2024-07-24 19:02:59 +08:00
committed by GitHub
parent ef00dad680
commit e23c1339a8
3 changed files with 12 additions and 12 deletions

View File

@ -47,6 +47,7 @@ import org.apache.doris.analysis.NativeInsertStmt;
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;
@ -334,6 +335,9 @@ public class StmtExecutor {
}
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());