mirror of https://github.com/apache/lucene.git
Fix latent casting bug in BKDWriter (#11907)
This commit is contained in:
parent
682e5c94e8
commit
f9c26ed501
|
@ -137,6 +137,8 @@ Bug Fixes
|
|||
|
||||
* GITHUB#11807: Don't rewrite queries in unified highlighter. (Alan Woodward)
|
||||
|
||||
* GITHUB#11907: Fix latent casting bugs in BKDWriter. (Ben Trent)
|
||||
|
||||
Optimizations
|
||||
---------------------
|
||||
* GITHUB#11738: Optimize MultiTermQueryConstantScoreWrapper when a term is present that matches all
|
||||
|
|
|
@ -515,7 +515,7 @@ public class BKDWriter implements Closeable {
|
|||
|
||||
checkMaxLeafNodeCount(numLeaves);
|
||||
|
||||
final byte[] splitPackedValues = new byte[numSplits * config.bytesPerDim];
|
||||
final byte[] splitPackedValues = new byte[Math.multiplyExact(numSplits, config.bytesPerDim)];
|
||||
final byte[] splitDimensionValues = new byte[numSplits];
|
||||
final long[] leafBlockFPs = new long[numLeaves];
|
||||
|
||||
|
@ -946,7 +946,7 @@ public class BKDWriter implements Closeable {
|
|||
|
||||
// Indexed by nodeID, but first (root) nodeID is 1. We do 1+ because the lead byte at each
|
||||
// recursion says which dim we split on.
|
||||
byte[] splitPackedValues = new byte[Math.toIntExact(numSplits * config.bytesPerDim)];
|
||||
byte[] splitPackedValues = new byte[Math.multiplyExact(numSplits, config.bytesPerDim)];
|
||||
byte[] splitDimensionValues = new byte[numSplits];
|
||||
|
||||
// +1 because leaf count is power of 2 (e.g. 8), and innerNodeCount is power of 2 minus 1 (e.g.
|
||||
|
|
Loading…
Reference in New Issue