This commit is contained in:
Kartal Kaan Bozdoğan 2025-12-16 16:32:15 +00:00 committed by GitHub
commit 8884a0f922
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -1149,6 +1149,11 @@ bool QueryPlannerAnalysis::explodeForSort(const CanonicalQuery& query,
if (!isOilExplodable(oil, iet)) {
break;
}
// We need not explode the fields in the desired sort order
auto elem = *kpIt;
if (elem.fieldNameStringData() == desiredSort.begin()->fieldNameStringData()) {
break;
}
numScans *= oil.intervals.size();
kpIt.next();
++boundsIdx;