diff --git a/processing/src/main/java/org/apache/druid/segment/index/IndexedStringDruidPredicateIndexes.java b/processing/src/main/java/org/apache/druid/segment/index/IndexedStringDruidPredicateIndexes.java index 8429b8b6a9f..42a8982d7ba 100644 --- a/processing/src/main/java/org/apache/druid/segment/index/IndexedStringDruidPredicateIndexes.java +++ b/processing/src/main/java/org/apache/druid/segment/index/IndexedStringDruidPredicateIndexes.java @@ -62,9 +62,8 @@ public final class IndexedStringDruidPredicateIndexes new Iterator() { final Iterator iterator = dictionary.iterator(); - @Nullable - String next = null; boolean nextSet = false; + int index = -1; @Override public boolean hasNext() @@ -85,23 +84,17 @@ public final class IndexedStringDruidPredicateIndexes iterator = localDictionary.iterator(); - int next; - int index = 0; + int index = -1; boolean nextSet = false; @Override @@ -635,19 +634,16 @@ public class NestedFieldColumnIndexSupplier iterator = localDictionary.iterator(); - int next; - int index = 0; + int index = -1; boolean nextSet = false; @Override @@ -916,22 +911,19 @@ public class NestedFieldColumnIndexSupplier iterator = localDictionary.iterator(); - int next; - int index = 0; + int index = -1; boolean nextSet = false; @Override @@ -1181,23 +1172,20 @@ public class NestedFieldColumnIndexSupplier iterator = localDictionary.iterator(); - int next; - int index; + int index = -1; boolean nextSet = false; @Override @@ -1407,13 +1394,14 @@ public class NestedFieldColumnIndexSupplier= adjustArrayId) { // this shouldn't be possible since arrayIds will only exist if array dictionary is not null // v4 columns however have a null array dictionary @@ -1442,10 +1430,6 @@ public class NestedFieldColumnIndexSupplier iterator = doubleDictionarySupplier.get().iterator(); final DruidDoublePredicate doublePredicate = matcherFactory.makeDoublePredicate(); - int next; - int index = 0; + int index = -1; boolean nextSet = false; @Override @@ -567,13 +566,14 @@ public class ScalarDoubleColumnAndIndexSupplier implements Supplier iterator = dictionary.iterator(); final DruidLongPredicate longPredicate = matcherFactory.makeLongPredicate(); - int next; - int index = 0; + int index = -1; boolean nextSet = false; @Override @@ -578,13 +577,14 @@ public class ScalarLongColumnAndIndexSupplier implements Supplier