Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHegarty committed Sep 13, 2023
1 parent ded62c6 commit f7e0926
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.apache.lucene.util.BytesRef;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.util.BigArrays;

import java.io.IOException;

Expand Down Expand Up @@ -79,7 +78,7 @@ static BytesRefVector of(StreamInput in) throws IOException {
if (constant && positions > 0) {
return new ConstantBytesRefVector(in.readBytesRef(), positions);
} else {
var builder = BytesRefVector.newVectorBuilder(positions, BigArrays.NON_RECYCLING_INSTANCE);
var builder = BytesRefVector.newVectorBuilder(positions);
for (int i = 0; i < positions; i++) {
builder.appendBytesRef(in.readBytesRef());
}
Expand All @@ -101,12 +100,8 @@ default void writeTo(StreamOutput out) throws IOException {
}
}

static Builder newVectorBuilder(int estimatedSize) { // For now
return new BytesRefVectorBuilder(estimatedSize, BigArrays.NON_RECYCLING_INSTANCE);
}

static Builder newVectorBuilder(int estimatedSize, BigArrays bigArrays) {
return new BytesRefVectorBuilder(estimatedSize, bigArrays);
static Builder newVectorBuilder(int estimatedSize) {
return new BytesRefVectorBuilder(estimatedSize);
}

sealed interface Builder extends Vector.Builder permits BytesRefVectorBuilder {
Expand Down

0 comments on commit f7e0926

Please sign in to comment.