s1monw commented on a change in pull request #578: LUCENE-8699: Use fixed byte 
array in HeapPointWriter
URL: https://github.com/apache/lucene-solr/pull/578#discussion_r258002380
 
 

 ##########
 File path: 
lucene/core/src/java/org/apache/lucene/util/bkd/OfflinePointWriter.java
 ##########
 @@ -68,6 +68,14 @@ public void append(BytesRef packedValue, int docID) throws 
IOException {
     assert expectedCount == 0 || count <= expectedCount;
   }
 
+  @Override
+  public void append(BytesRef packedValueWithDocId) throws IOException {
+    assert packedValueWithDocId.length == packedBytesLength + Integer.BYTES;
+    out.writeBytes(packedValueWithDocId.bytes, packedValueWithDocId.offset, 
packedValueWithDocId.length);
+    count++;
+    assert expectedCount == 0 || count <= expectedCount;
 
 Review comment:
   use 2 different asserts instead of an OR that makes it easier to see what 
failed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to