Skip to content

Commit

Permalink
[CI] Auto commit changes from spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticsearchmachine committed Jan 2, 2025
1 parent d8a4760 commit f655c5e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ private void hasPrivilege(ActionListener<Void> outListener) {
private void doLookup(T request, CancellableTask task, ActionListener<List<Page>> listener) {
Block inputBlock = request.inputPage.getBlock(0);
if (inputBlock.areAllValuesNull()) {
List<Page> nullResponse = mergePages ?
List.of(createNullResponse(request.inputPage.getPositionCount(), request.extractFields))
List<Page> nullResponse = mergePages
? List.of(createNullResponse(request.inputPage.getPositionCount(), request.extractFields))
: List.of();
listener.onResponse(nullResponse);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import org.elasticsearch.compute.data.BlockStreamInput;
import org.elasticsearch.compute.data.Page;
import org.elasticsearch.compute.operator.lookup.QueryList;
import org.elasticsearch.core.Releasable;
import org.elasticsearch.core.Releasables;
import org.elasticsearch.index.mapper.MappedFieldType;
import org.elasticsearch.index.query.SearchExecutionContext;
Expand Down Expand Up @@ -232,9 +231,7 @@ List<Page> pages() {
@Override
protected void innerRelease() {
if (pages != null) {
Releasables.closeExpectNoException(
Releasables.wrap(Iterators.map(pages.iterator(), page -> page::releaseBlocks))
);
Releasables.closeExpectNoException(Releasables.wrap(Iterators.map(pages.iterator(), page -> page::releaseBlocks)));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import org.elasticsearch.TransportVersion;
import org.elasticsearch.common.breaker.CircuitBreaker;
import org.elasticsearch.common.breaker.CircuitBreakingException;
import org.elasticsearch.common.collect.Iterators;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.io.stream.Writeable;
Expand All @@ -21,7 +20,6 @@
import org.elasticsearch.compute.data.IntBlock;
import org.elasticsearch.compute.data.IntVector;
import org.elasticsearch.compute.data.Page;
import org.elasticsearch.compute.operator.DriverContext;
import org.elasticsearch.core.Releasables;
import org.elasticsearch.test.AbstractWireSerializingTestCase;
import org.elasticsearch.xpack.esql.TestBlockFactory;
Expand Down Expand Up @@ -115,9 +113,7 @@ public void testTakePages() {
return;
}
List<Page> pages = orig.takePages();
Releasables.closeExpectNoException(
Releasables.wrap(Iterators.map(pages.iterator(), page -> page::releaseBlocks))
);
Releasables.closeExpectNoException(Releasables.wrap(Iterators.map(pages.iterator(), page -> page::releaseBlocks)));
assertThat(factory.breaker().getUsed(), equalTo(0L));
assertThat(orig.takePages(), nullValue());
} finally {
Expand All @@ -126,7 +122,6 @@ public void testTakePages() {
assertThat(factory.breaker().getUsed(), equalTo(0L));
}


private BlockFactory blockFactory() {
BigArrays bigArrays = new MockBigArrays(PageCacheRecycler.NON_RECYCLING_INSTANCE, ByteSizeValue.ofMb(4 /* more than we need*/))
.withCircuitBreaking();
Expand Down

0 comments on commit f655c5e

Please sign in to comment.