msokolov commented on code in PR #14792:
URL: https://github.com/apache/lucene/pull/14792#discussion_r2167410847


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene95/OffHeapFloatVectorValues.java:
##########
@@ -270,7 +270,8 @@ public DocIdSetIterator iterator() {
     }
   }
 
-  private static class EmptyOffHeapVectorValues extends 
OffHeapFloatVectorValues {
+  /** Empty vector values when there are no vectors stored. */

Review Comment:
   "values when" should read "values to be returned when" 



##########
lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99ScalarQuantizedVectorsReader.java:
##########
@@ -189,6 +190,21 @@ private FieldEntry getFieldEntry(String field) {
   public FloatVectorValues getFloatVectorValues(String field) throws 
IOException {
     final FieldEntry fieldEntry = getFieldEntry(field);
     final FloatVectorValues rawVectorValues = 
rawVectorsReader.getFloatVectorValues(field);
+    if (rawVectorValues instanceof 
OffHeapFloatVectorValues.EmptyOffHeapVectorValues

Review Comment:
   I think I'd like this better if we checked `rawVectorValues.size() == 0` 
instead of having an `instanceof` check.  We might change the class, or replace 
it with an anonymous class or something, but we will always have size=0.



-- 
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: issues-unsubscr...@lucene.apache.org

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


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

Reply via email to