Skip to content

Commit dde5de1

Browse files
Drunk Sebastian (#3429)
1 parent d3aeffc commit dde5de1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/model/TargetIndexMatcher.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ public boolean servedByIndex(FieldIndex index) {
146146

147147
// Process all equalities first. Equalities can appear out of order.
148148
for (; segmentIndex < segments.size(); ++segmentIndex) {
149-
// We attempt to greedily match all segments to equality filters. If a a filter matches an
150-
// index segments, we can mark the segment as used. Since it is not possible to use the same
151-
// filed path in both an equality and inequality/oderBy cause, we do not have to consider the
149+
// We attempt to greedily match all segments to equality filters. If a filter matches an
150+
// index segment, we can mark the segment as used. Since it is not possible to use the same
151+
// field path in both an equality and inequality/oderBy clause, we do not have to consider the
152152
// possibility that a matching equality segment should instead be used to map to an inequality
153153
// filter or orderBy clause.
154154
if (!hasMatchingEqualityFilter(segments.get(segmentIndex))) {
@@ -166,7 +166,7 @@ public boolean servedByIndex(FieldIndex index) {
166166
}
167167

168168
// If there is an inequality filter, the next segment must match both the filter and the first
169-
// orderBy clause.
169+
// orderBy clause.
170170
if (inequalityFilter != null) {
171171
FieldIndex.Segment segment = segments.get(segmentIndex);
172172
if (!matchesFilter(inequalityFilter, segment) || !matchesOrderBy(orderBys.next(), segment)) {
@@ -175,7 +175,7 @@ public boolean servedByIndex(FieldIndex index) {
175175
++segmentIndex;
176176
}
177177

178-
// All remaining segment need to represent the prefix of the target's orderBy
178+
// All remaining segments need to represent the prefix of the target's orderBy.
179179
for (; segmentIndex < segments.size(); ++segmentIndex) {
180180
FieldIndex.Segment segment = segments.get(segmentIndex);
181181
if (!orderBys.hasNext() || !matchesOrderBy(orderBys.next(), segment)) {

0 commit comments

Comments
 (0)