fdb-record-layer
fdb-record-layer copied to clipboard
Sorted and not primary key ordered
This predicate and the comment that follows are not correct:
if (planOrderingKey != null && (sort != null || planOrderingKey.isPrimaryKeyOrdered())) {
// If there is a sort, all chosen plans should be ordered by it and so compatible.
The problem case is where there are additional ordering keys (that is, indexed fields) after the query's sort (which the plan satisfies), but before the primary key.