Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
imply-cheddar committed Dec 6, 2022
1 parent 01cea90 commit edb06d8
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,14 +388,13 @@ public boolean canAccept(final Stage stage)
} else if (stage.compareTo(currentStage) <= 0) {
// Cannot go backwards.
return false;
} else // Cannot do post-sort stages without a sort.
// Looks good.
if (stage.compareTo(Stage.AGGREGATE) > 0 && stage.compareTo(Stage.SORT) < 0 && aggregate == null) {
// Cannot do post-aggregation stages without an aggregation.
return false;
} else {
return stage.compareTo(Stage.SORT) <= 0 || sort != null;
}
} else if (stage.compareTo(Stage.AGGREGATE) > 0 && stage.compareTo(Stage.SORT) < 0 && aggregate == null) {
// Cannot do post-aggregation stages without an aggregation.
return false;
} else {
// If we are after the SORT phase, make sure we have a sort...
return stage.compareTo(Stage.SORT) <= 0 || sort != null;
}
}

/**
Expand Down

0 comments on commit edb06d8

Please sign in to comment.