Skip to content

Drunk Sebastian #3429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ public boolean servedByIndex(FieldIndex index) {

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

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

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