Github user iverase commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/451#discussion_r221582158
  
    --- Diff: lucene/core/src/java/org/apache/lucene/util/bkd/BKDReader.java ---
    @@ -442,11 +442,12 @@ void visitDocValues(int[] commonPrefixLengths, byte[] 
scratchPackedValue1, byte[
         readCommonPrefixes(commonPrefixLengths, scratchPackedValue1, in);
     
         if (numIndexDims != 1 && version >= 
BKDWriter.VERSION_LEAF_STORES_BOUNDS) {
    -      byte[] minPackedValue = scratchPackedValue1;
    -      byte[] maxPackedValue = scratchPackedValue2;
    +      byte[] minPackedValue = new byte[packedIndexBytesLength];
    +      byte[] maxPackedValue = new byte[packedIndexBytesLength];
    --- End diff --
    
    Maybe we should try to avoid to allocate a new array for every visited leaf 
node. We can create byte array helpers on IntersectState with the correct 
length.


---

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

Reply via email to