Skip to content

Commit e2c681f

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 6d904bf commit e2c681f

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

server/src/main/java/org/elasticsearch/index/codec/tsdb/es819/ES819TSDBDocValuesProducer.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,9 @@ long findAndUpdateBlock(DirectMonotonicReader docRanges, long lastBlockId, int d
538538

539539
BytesRef decode(int docNumber, int numBlocks) throws IOException {
540540
// docNumber, rather than docId, because these are dense and could be indices from a DISI
541-
long blockId = docNumber < limitDocNumForBlock ? lastBlockId : findAndUpdateBlock(docOffsets, lastBlockId, docNumber, numBlocks);
541+
long blockId = docNumber < limitDocNumForBlock
542+
? lastBlockId
543+
: findAndUpdateBlock(docOffsets, lastBlockId, docNumber, numBlocks);
542544

543545
int numDocsInBlock = (int) (limitDocNumForBlock - startDocNumForBlock);
544546
int idxInBlock = (int) (docNumber - startDocNumForBlock);
@@ -557,12 +559,7 @@ BytesRef decode(int docNumber, int numBlocks) throws IOException {
557559
return uncompressedBytesRef;
558560
}
559561

560-
void decodeBulk(
561-
int numBlocks,
562-
int firstDoc,
563-
int count,
564-
BlockLoader.SingletonBytesRefBuilder builder
565-
) throws IOException {
562+
void decodeBulk(int numBlocks, int firstDoc, int count, BlockLoader.SingletonBytesRefBuilder builder) throws IOException {
566563
int remainingCount = count;
567564
int nextDoc = firstDoc;
568565
int blockDocOffset = 0;
@@ -571,7 +568,9 @@ void decodeBulk(
571568
List<BytesRef> decompressedBlocks = new ArrayList<>();
572569

573570
while (remainingCount > 0) {
574-
long blockId = nextDoc < limitDocNumForBlock ? lastBlockId : findAndUpdateBlock(this.docOffsets, lastBlockId, nextDoc, numBlocks);
571+
long blockId = nextDoc < limitDocNumForBlock
572+
? lastBlockId
573+
: findAndUpdateBlock(this.docOffsets, lastBlockId, nextDoc, numBlocks);
575574
assert blockId >= 0;
576575

577576
int numDocsInBlock = (int) (limitDocNumForBlock - startDocNumForBlock);
@@ -605,7 +604,9 @@ void decodeBulk(
605604
// avoid making a copy if this was the last block to be decompressed
606605
decompressedBlocks.add(new BytesRef(uncompressedBlock, startOffset, lenValuesInBlock));
607606
} else {
608-
decompressedBlocks.add(new BytesRef(Arrays.copyOfRange(uncompressedBlock, startOffset, startOffset + lenValuesInBlock)));
607+
decompressedBlocks.add(
608+
new BytesRef(Arrays.copyOfRange(uncompressedBlock, startOffset, startOffset + lenValuesInBlock))
609+
);
609610
}
610611
}
611612

0 commit comments

Comments
 (0)