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


##########
src/java/org/apache/cassandra/index/sai/disk/v1/segment/SegmentBuilder.java:
##########
@@ -71,10 +73,48 @@
     private ByteBuffer minTerm;
     private ByteBuffer maxTerm;
 
+    final AbstractType<?> termComparator;
     long totalBytesAllocated;
     int rowCount = 0;
     int maxSegmentRowId = -1;
 
+    public static class KDTreeSegmentBuilder extends SegmentBuilder
+    {
+        protected final byte[] buffer;

Review Comment:
   That is correct, but...
   
   This is only used in `addInternal` and then a `BytesRef` is created as a 
wrapper around this buffer in order to add it to the `ByteBlockPool`. In the 
`ByteBlockPool` the buffer is copied so it is safe to change this to create a 
`BytesRef` so we don't need to create a new one for each add operation.



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