mike-tr-adamson commented on code in PR #2673:
URL: https://github.com/apache/cassandra/pull/2673#discussion_r1336152655


##########
src/java/org/apache/cassandra/cql3/SingleColumnRelation.java:
##########
@@ -264,6 +265,16 @@ protected Restriction newLikeRestriction(TableMetadata 
table, VariableSpecificat
         return new SingleColumnRestriction.LikeRestriction(columnDef, 
operator, term);
     }
 
+    @Override
+    protected Restriction newAnnRestriction(TableMetadata table, 
VariableSpecifications boundNames)
+    {
+        ColumnMetadata columnDef = table.getExistingColumn(entity);
+        if (!(columnDef.type instanceof VectorType))
+            throw invalidRequest("ANN is only supported against DENSE FLOAT32 
columns");

Review Comment:
   Just a note: I have added extra unit tests to `VectorInvalidQueryTest` for 
the cases that were missing. These missing tests highlighted the fact that this 
code was no longer needed. I have refactored the `StatementRestrictions` 
initialization where it relates to vector indexes and ANN ordering to correctly 
handle the missing test cases.



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