airborne12 commented on code in PR #48988:
URL: https://github.com/apache/doris/pull/48988#discussion_r1992846830


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Index.java:
##########
@@ -260,18 +268,22 @@ public TOlapTableIndex toThrift() {
         if (properties != null) {
             tIndex.setProperties(properties);
         }
-        tIndex.setColumnUniqueIds(columnUniqueIds);
+        if (columnUniqueIds != null) {
+            tIndex.setColumnUniqueIds(columnUniqueIds);
+        }
         return tIndex;
     }
 
     public OlapFile.TabletIndexPB toPb(Map<Integer, Column> columnMap) {
         OlapFile.TabletIndexPB.Builder builder = 
OlapFile.TabletIndexPB.newBuilder();
         builder.setIndexId(indexId);
         builder.setIndexName(indexName);
-        for (Integer columnUniqueId : columnUniqueIds) {
-            Column column = columnMap.get(columnUniqueId);
-            if (column != null) {
-                builder.addColUniqueId(column.getUniqueId());
+        if (columnUniqueIds != null) {

Review Comment:
   Need to throw excepation here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to