You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/08/18 13:49:16 UTC
[doris] branch master updated: [Fix](RoutineLoad)Fix when Unique (MoW) RoutineLoad imports unspecified Sequence column (#23167)
This is an automated email from the ASF dual-hosted git repository.
morningman 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 6847592137 [Fix](RoutineLoad)Fix when Unique (MoW) RoutineLoad imports unspecified Sequence column (#23167)
6847592137 is described below
commit 684759213789ee34636519ac57214fed67ec5528
Author: Calvin Kirs <ac...@163.com>
AuthorDate: Fri Aug 18 21:49:09 2023 +0800
[Fix](RoutineLoad)Fix when Unique (MoW) RoutineLoad imports unspecified Sequence column (#23167)
[Fix](RoutineLoad)Fix when Unique (MoW) routineload imports unspecified Sequence column
---
.../org/apache/doris/planner/external/LoadScanProvider.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/external/LoadScanProvider.java b/fe/fe-core/src/main/java/org/apache/doris/planner/external/LoadScanProvider.java
index 9089f0c2c7..25be5de433 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/external/LoadScanProvider.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/external/LoadScanProvider.java
@@ -190,7 +190,7 @@ public class LoadScanProvider {
.filter(c -> c.getColumnName().equalsIgnoreCase(finalSequenceCol)).findAny();
// if `columnDescs.descs` is empty, that means it's not a partial update load, and user not specify
// column name.
- if (foundCol.isPresent() || columnDescs.descs.isEmpty()) {
+ if (foundCol.isPresent() || shouldAddSequenceColumn(columnDescs)) {
columnDescs.descs.add(new ImportColumnDesc(Column.SEQUENCE_COL,
new SlotRef(null, sequenceCol)));
} else if (!fileGroupInfo.isPartialUpdate()) {
@@ -226,6 +226,17 @@ public class LoadScanProvider {
}
}
+ /**
+ * if not set sequence column and column size is null or only have deleted sign ,return true
+ */
+ private boolean shouldAddSequenceColumn(LoadTaskInfo.ImportColumnDescs columnDescs) {
+ if (columnDescs.descs.isEmpty()) {
+ return true;
+ }
+ return columnDescs.descs.size() == 1 && columnDescs.descs.get(0).getColumnName()
+ .equalsIgnoreCase(Column.DELETE_SIGN);
+ }
+
private TFileFormatType formatType(String fileFormat, String path) throws UserException {
if (fileFormat != null) {
String lowerFileFormat = fileFormat.toLowerCase();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org