Skip to content

Commit 6185ba6

Browse files
authored
Avoid implicit casting in ESQL SearchStats (#104947) (#104979)
./gradlew precommit fails with JDK21 and we should use longs instead of ints.
1 parent 0c8781c commit 6185ba6

File tree

1 file changed

+2
-2
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/stats

1 file changed

+2
-2
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/stats/SearchStats.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ private interface DocCountTester {
232232
//
233233
// @see org.elasticsearch.search.query.QueryPhaseCollectorManager#shortcutTotalHitCount(IndexReader, Query)
234234
//
235-
private static int countEntries(IndexReader indexReader, String field) {
236-
int count = 0;
235+
private static long countEntries(IndexReader indexReader, String field) {
236+
long count = 0;
237237
try {
238238
for (LeafReaderContext context : indexReader.leaves()) {
239239
LeafReader reader = context.reader();

0 commit comments

Comments
 (0)