Skip to content

Commit

Permalink
[fix](inverted index)Support rename column with inverted index (apach…
Browse files Browse the repository at this point in the history
…e#38079)

Copy columns and properties to make them mutable.
close apache#38078
  • Loading branch information
qidaye committed Jul 19, 2024
1 parent 53ca312 commit 366f443
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fe/fe-core/src/main/java/org/apache/doris/catalog/Index.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import org.apache.doris.thrift.TIndexType;
import org.apache.doris.thrift.TOlapTableIndex;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.gson.annotations.SerializedName;
import org.apache.commons.lang3.StringUtils;

Expand Down Expand Up @@ -67,9 +69,9 @@ public Index(long indexId, String indexName, List<String> columns,
IndexDef.IndexType indexType, Map<String, String> properties, String comment) {
this.indexId = indexId;
this.indexName = indexName;
this.columns = columns;
this.columns = columns == null ? Lists.newArrayList() : Lists.newArrayList(columns);
this.indexType = indexType;
this.properties = properties;
this.properties = properties == null ? Maps.newHashMap() : Maps.newHashMap(properties);
this.comment = comment;
if (indexType == IndexDef.IndexType.INVERTED) {
if (this.properties != null && !this.properties.isEmpty()) {
Expand Down

0 comments on commit 366f443

Please sign in to comment.