Skip to content

Commit 71dee84

Browse files
committed
minimal
1 parent 350f2b1 commit 71dee84

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/SingletonOrdinalsBuilder.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ public SingletonOrdinalsBuilder endPositionEntry() {
5959
}
6060

6161
BytesRefBlock buildOrdinal() {
62-
if (minOrd > maxOrd) {
63-
return buildRegularBlock();
64-
}
6562
int valueCount = maxOrd - minOrd + 1;
6663
long breakerSize = ordsSize(valueCount);
6764
blockFactory.adjustBreaker(breakerSize);
@@ -175,7 +172,7 @@ public BytesRefBlock build() {
175172
boolean shouldBuildOrdinalsBlock() {
176173
if (minOrd <= maxOrd) {
177174
int numOrds = maxOrd - minOrd + 1;
178-
return ords.length >= 2 * numOrds && ords.length >= 32;
175+
return OrdinalBytesRefBlock.isDense(ords.length, numOrds);
179176
} else {
180177
return false;
181178
}

0 commit comments

Comments
 (0)