Skip to content

Commit

Permalink
Fix flaky spill stats check in aggregation test
Browse files Browse the repository at this point in the history
The flaky is due to spill check condition is fragile which is based on whether we have received
more than one input at partial aggregation. We shall change to final aggregation and given we
have four drivers so it is not guarantee one aggregation has received more than one input row.
Since we have recorded the spill injection count, then we just rely on this to check spill stats.
  • Loading branch information
xiaoxmeng committed Apr 11, 2024
1 parent a3b4849 commit e6971b9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ void AggregationTestBase::testAggregationsWithCompanion(
toPlanStats(task->taskStats()).at(partialNodeId).inputRows;
const auto finalInputRows =
toPlanStats(task->taskStats()).at(finalNodeId).inputRows;
if (partialInputRows > 1) {
if (exec::injectedSpillCount() > 0) {
EXPECT_LT(0, spilledBytes(*task))
<< "partial inputRows: " << partialInputRows
<< " final inputRows: " << finalInputRows
Expand Down Expand Up @@ -854,7 +854,7 @@ void AggregationTestBase::testAggregationsImpl(
toPlanStats(task->taskStats()).at(partialNodeId).inputRows;
const auto finalInputRows =
toPlanStats(task->taskStats()).at(finalNodeId).inputRows;
if (partialInputRows > 1) {
if (exec::injectedSpillCount() > 0) {
EXPECT_LT(0, spilledBytes(*task))
<< "partial inputRows: " << partialInputRows
<< " final inputRows: " << finalInputRows
Expand Down

0 comments on commit e6971b9

Please sign in to comment.