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_r378023023
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/IndexDef.java
 ##########
 @@ -118,4 +121,32 @@ public String getComment() {
     public enum IndexType {
         BITMAP,
     }
+    public void checkColumn(Column column) throws AnalysisException {
+        if (indexType == IndexType.BITMAP) {
+            String indexColName = column.getName();
+            PrimitiveType colType = column.getDataType();
+            if (!(colType.isDateType() || colType.isDecimalType() || 
colType.isFixedPointType() ||
+                          colType.isStringType() || colType == 
PrimitiveType.BOOLEAN)) {
+                throw new AnalysisException(colType + " is not supported in 
bitmap index. "
+                        + "invalid column: " + indexColName);
+            } else if (!(column.isKey()
+                                 || column.getAggregationType() == 
AggregateType.NONE
+                                 || column.getAggregationType() == 
AggregateType.REPLACE
+                                 || column.getAggregationType() == 
AggregateType.REPLACE_IF_NOT_NULL)){
+                // althrough the implemention supports bf for replace non-key 
column,
 
 Review comment:
   its a typo  i will remove it 

----------------------------------------------------------------
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