diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/gen_BulkOperation.py b/lucene/core/src/java/org/apache/lucene/util/packed/gen_BulkOperation.py index 5ee811c91c4..ea904a2ba1c 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/gen_BulkOperation.py +++ b/lucene/core/src/java/org/apache/lucene/util/packed/gen_BulkOperation.py @@ -57,16 +57,16 @@ FOOTER=""" * For every number of bits per value, there is a minimum number of * blocks (b) / values (v) you need to write in order to reach the next block * boundary: - * - 16 bits per value -> b=2, v=1 - * - 24 bits per value -> b=3, v=1 - * - 50 bits per value -> b=25, v=4 - * - 63 bits per value -> b=63, v=8 + * - 16 bits per value -> b=2, v=1 + * - 24 bits per value -> b=3, v=1 + * - 50 bits per value -> b=25, v=4 + * - 63 bits per value -> b=63, v=8 * - ... * * A bulk read consists in copying iterations*v values that are * contained in iterations*b blocks into a long[] * (higher values of iterations are likely to yield a better - * throughput) => this requires n * (b + 8v) bytes of memory. + * throughput): this requires n * (b + 8v) bytes of memory. * * This method computes iterations as * ramBudget / (b + 8v) (since a long is 8 bytes). diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/gen_Direct.py b/lucene/core/src/java/org/apache/lucene/util/packed/gen_Direct.py index 0031a5ce455..346538e41dc 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/gen_Direct.py +++ b/lucene/core/src/java/org/apache/lucene/util/packed/gen_Direct.py @@ -105,16 +105,6 @@ if __name__ == '__main__': public void clear() { Arrays.fill(values, %s0L); } - - @Override - public Object getArray() { - return values; - } - - @Override - public boolean hasArray() { - return true; - } """ %(MASKS[bpv], CASTS[bpv], CASTS[bpv])) if bpv == 64: diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py b/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py index 4639da6e9bd..fb70caf3f68 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py +++ b/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py @@ -178,7 +178,7 @@ abstract class Packed64SingleBlock extends PackedInts.MutableImpl { public void fill(int fromIndex, int toIndex, long val) { assert fromIndex >= 0; assert fromIndex <= toIndex; - assert PackedInts.bitsRequired(val) <= bitsPerValue; + assert PackedInts.unsignedBitsRequired(val) <= bitsPerValue; final int valuesPerBlock = 64 / bitsPerValue; if (toIndex - fromIndex <= valuesPerBlock << 1) {