smiklosovic commented on a change in pull request #1141:
URL: https://github.com/apache/cassandra/pull/1141#discussion_r690725961



##########
File path: 
src/java/org/apache/cassandra/index/sasi/analyzer/DelimiterAnalyzer.java
##########
@@ -56,14 +57,16 @@ public ByteBuffer next()
         return iter.next();
     }
 
+    public void validate(Map<String, String> options, AbstractType validator) 
throws ConfigurationException
+    {
+        if (!VALID_ANALYZABLE_TYPES.containsKey(validator))
+            throw new ConfigurationException(String.format("Only text types 
supported, got %s", validator));

Review comment:
       @adelapena 
   I do not have a problem with the approach you are describing at the end of 
your response but please look closely here:
   
   ````
                   if (!analyzer.isCompatibleWith(cd.type))
                       throw new ConfigurationException(String.format("%s does 
not support type %s",
                                                                      
analyzerClass.getSimpleName(),
                                                                      
cd.type.asCQL3Type()));
                   analyzer.validate(indexOptions, cd.cellValueType());
   ````
   
   `cd.type` is not the same thing as `cd.cellValueType()` (go into 
cellValueType() and read the docs).
   
   isCompatibleWith excepts 'different" AbstractType than validate method would 
accept, if I understand that correctly.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to