Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 6bda9c2

Browse files
committed
Invalidate row count cache on reduction.
Signed-off-by: ienkovich <[email protected]>
1 parent 671f8aa commit 6bda9c2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

omniscidb/QueryEngine/Execute.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,9 +1248,12 @@ ResultSetPtr Executor::reduceMultiDeviceResultSets(
12481248

12491249
const auto& first = results_per_device.front().first;
12501250

1251+
if (results_per_device.size() == 1) {
1252+
return first;
1253+
}
1254+
12511255
if (query_mem_desc.getQueryDescriptionType() ==
1252-
QueryDescriptionType::GroupByBaselineHash &&
1253-
results_per_device.size() > 1) {
1256+
QueryDescriptionType::GroupByBaselineHash) {
12541257
const auto total_entry_count = std::accumulate(
12551258
results_per_device.begin(),
12561259
results_per_device.end(),
@@ -1291,6 +1294,7 @@ ResultSetPtr Executor::reduceMultiDeviceResultSets(
12911294
}
12921295
} else {
12931296
reduced_results = first;
1297+
reduced_results->invalidateCachedRowCount();
12941298
}
12951299

12961300
int64_t compilation_queue_time = 0;

0 commit comments

Comments
 (0)