This is an automated email from the ASF dual-hosted git repository. liaoxin 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 5aee6241ef7 [fix](cloud) fix strict mode invalidation when copy.use_delete_sign is true for copy into (#37650) 5aee6241ef7 is described below commit 5aee6241ef759e0fb437ba9e557c048155f3a919 Author: hui lai <1353307...@qq.com> AuthorDate: Sat Jul 13 09:54:08 2024 +0800 [fix](cloud) fix strict mode invalidation when copy.use_delete_sign is true for copy into (#37650) Fix strict mode invalidation when copy.use_delete_sign is true for copy into Co-authored-by: Xin Liao <liaoxin...@126.com> --- .../main/java/org/apache/doris/analysis/CopyFromParam.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/CopyFromParam.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/CopyFromParam.java index c6d42d9b99f..b2a57cd1f5d 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/CopyFromParam.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/CopyFromParam.java @@ -147,10 +147,16 @@ public class CopyFromParam { } } else { for (int i = 0; i < targetColumns.size(); i++) { - BinaryPredicate binaryPredicate = new BinaryPredicate(Operator.EQ, - new SlotRef(null, targetColumns.get(i)), - new SlotRef(null, fileColumns.get(i))); - columnMappingList.add(binaryPredicate); + // If file column name equals target column name, don't need to add to + // columnMapping List. Otherwise it will result in invalidation of strict + // mode. Because if the src data is an expr, strict mode judgment will + // not be performed. + if (!fileColumns.get(i).equalsIgnoreCase(targetColumns.get(i))) { + BinaryPredicate binaryPredicate = new BinaryPredicate(Operator.EQ, + new SlotRef(null, targetColumns.get(i)), + new SlotRef(null, fileColumns.get(i))); + columnMappingList.add(binaryPredicate); + } } } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org