yangzhg commented on a change in pull request #2883: add column type check when 
create bitmap index using create index clause
URL: https://github.com/apache/incubator-doris/pull/2883#discussion_r377679923
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/alter/Alter.java
 ##########
 @@ -200,12 +202,39 @@ public void processAlterTable(AlterTableStmt stmt) 
throws UserException {
                         }
                         Set<String> idxSet = new 
TreeSet<>(String.CASE_INSENSITIVE_ORDER);
                         idxSet.addAll(idx.getColumns());
-                            if (newColset.equals(idxSet)) {
-                                throw new AnalysisException("index for columns 
(" + String
-                                        .join(",", indexDef.getColumns()) + " 
) already exist.");
+                        if (newColset.equals(idxSet)) {
+                            throw new AnalysisException("index for columns (" 
+ String
+                                    .join(",", indexDef.getColumns()) + " ) 
already exist.");
+                        }
+                    }
+                    OlapTable olapTable = (OlapTable) table;
+                    for (String col : indexDef.getColumns()) {
+                        for (Column c : olapTable.getFullSchema()) {
 
 Review comment:
   the colum name from  create index clause  may not the same case with 
`olapTable.getColumn ()` so i must use case `equalsIgnoreCase` to find

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to