This is an automated email from the ASF dual-hosted git repository.
lide pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
new 418d1671587 [branch-1.2-bug](SchemaChange) Loading tasks during alter
job cause modify column failed #27302
418d1671587 is described below
commit 418d1671587015db8eaa37d15269f7ba8e0918f4
Author: xy720 <[email protected]>
AuthorDate: Tue Nov 21 11:05:22 2023 +0800
[branch-1.2-bug](SchemaChange) Loading tasks during alter job cause modify
column failed #27302
---
.../src/main/java/org/apache/doris/planner/OlapTableSink.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
index d9f7fd7158d..f2eb07443a8 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
@@ -17,6 +17,7 @@
package org.apache.doris.planner;
+import org.apache.doris.alter.SchemaChangeHandler;
import org.apache.doris.analysis.SlotDescriptor;
import org.apache.doris.analysis.TupleDescriptor;
import org.apache.doris.catalog.Column;
@@ -211,6 +212,12 @@ public class OlapTableSink extends DataSink {
columns.addAll(indexMeta.getSchema().stream().map(Column::getNonShadowName).collect(Collectors.toList()));
for (Column column : indexMeta.getSchema()) {
TColumn tColumn = column.toThrift();
+ // When schema change is doing, some modified column has
prefix in name. Columns here
+ // is for the schema in rowset meta, which should be no column
with shadow prefix.
+ // So we should remove the shadow prefix here.
+ if
(column.getName().startsWith(SchemaChangeHandler.SHADOW_NAME_PREFIX)) {
+ tColumn.setColumnName(column.getNonShadowName());
+ }
column.setIndexFlag(tColumn, table);
columnsDesc.add(tColumn);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]