Skip to content

Commit ef609b2

Browse files
Typos
1 parent 438e0c3 commit ef609b2

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

packages/firestore/src/model/target_index_matcher.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import {
3535
/**
3636
* A light query planner for Firestore.
3737
*
38-
* This class matches a `FieldIndex`z against a Firestore Query `Target`. It
38+
* This class matches a `FieldIndex` against a Firestore Query `Target`. It
3939
* determines whether a given index can be used to serve the specified target.
4040
*
4141
* The following table showcases some possible index configurations:
@@ -57,7 +57,7 @@ export class TargetIndexMatcher {
5757
private readonly collectionId: string;
5858
// The single inequality filter of the target (if it exists).
5959
private readonly inequalityFilter?: FieldFilter;
60-
// The list of equality filter of the target.
60+
// The list of equality filters of the target.
6161
private readonly equalityFilters: FieldFilter[];
6262
// The list of orderBys of the target.
6363
private readonly orderBys: OrderBy[];
@@ -127,10 +127,10 @@ export class TargetIndexMatcher {
127127

128128
// Process all equalities first. Equalities can appear out of order.
129129
for (; segmentIndex < segments.length; ++segmentIndex) {
130-
// We attempt to greedily match all segments to equality filters. If a a
131-
// filter matches an index segments, we can mark the segment as used.
132-
// Since it is not possible to use the same filed path in both an equality
133-
// and inequality/oderBy cause, we do not have to consider the possibility
130+
// We attempt to greedily match all segments to equality filters. If a
131+
// filter matches an index segment, we can mark the segment as used.
132+
// Since it is not possible to use the same field path in both an equality
133+
// and inequality/oderBy clause, we do not have to consider the possibility
134134
// that a matching equality segment should instead be used to map to an
135135
// inequality filter or orderBy clause.
136136
if (!this.hasMatchingEqualityFilter(segments[segmentIndex])) {
@@ -161,8 +161,8 @@ export class TargetIndexMatcher {
161161
++segmentIndex;
162162
}
163163

164-
// All remaining segment need to represent the prefix of the target's
165-
// orderBy
164+
// All remaining segments need to represent the prefix of the target's
165+
// orderBy.
166166
for (; segmentIndex < segments.length; ++segmentIndex) {
167167
const segment = segments[segmentIndex];
168168
if (

packages/firestore/test/unit/model/target_index_matcher.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,15 @@ describe('Target Bounds', () => {
138138
}
139139
});
140140

141-
it('inequalitiesWithDefaultOrder', () => {
141+
it('inequalities with default order', () => {
142142
for (const query of queriesWithInequalities) {
143143
validateServesTarget(query, 'a', IndexKind.ASCENDING);
144144
validateDoesNotServeTarget(query, 'b', IndexKind.ASCENDING);
145145
validateDoesNotServeTarget(query, 'a', IndexKind.CONTAINS);
146146
}
147147
});
148148

149-
it('inequalitiesWithAscendingOrder', () => {
149+
it('inequalities with ascending order', () => {
150150
const queriesWithInequalitiesAndAscendingOrder =
151151
queriesWithInequalities.map(q =>
152152
queryWithAddedOrderBy(q, orderBy('a', 'asc'))
@@ -159,7 +159,7 @@ describe('Target Bounds', () => {
159159
}
160160
});
161161

162-
it('inequalitiesWithDescendingOrder', () => {
162+
it('inequalities with descending order', () => {
163163
const queriesWithInequalitiesAndDescendingOrder =
164164
queriesWithInequalities.map(q =>
165165
queryWithAddedOrderBy(q, orderBy('a', 'desc'))
@@ -226,7 +226,7 @@ describe('Target Bounds', () => {
226226
}
227227
});
228228

229-
it('array-contains is idempotent', () => {
229+
it('array-contains is independent', () => {
230230
const q = queryWithAddedOrderBy(
231231
queryWithAddedFilter(
232232
query('collId'),

0 commit comments

Comments
 (0)