Pranshu-S commented on code in PR #16710:
URL: https://github.com/apache/lucene/pull/16710#discussion_r4143720973


##########
lucene/sandbox/src/java/org/apache/lucene/sandbox/codecs/dedup/DedupMergeContext.java:
##########
@@ -134,12 +134,12 @@ void finish(
       groupInfo.write(meta);
 
       if (quantizer != null) {
+        // Flavors referenced by this group's fields, shared across both 
quantized branches.
+        Set<DedupQuantizer.Flavor> flavors = 
EnumSet.noneOf(DedupQuantizer.Flavor.class);
+        for (FieldData fieldData : entry.getValue()) {
+          
flavors.add(DedupQuantizer.Flavor.of(fieldData.fieldInfo.getVectorSimilarityFunction()));
+        }

Review Comment:
   flavors is only ever consumed inside the FloatGroup and Float16Group 
branches, for a BYTE group we write an empty group, which doesn't take flavors. 
So building it for a BYTE group cannot affect what's written. The only cost is 
a tiny bit of wasted work for BYTE groups.
   



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