Skip to content

Commit

Permalink
Use custom verifiers in verifySortedAggregation (facebookincubator#9296)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebookincubator#9296

verifySortedAggregation currently ignores any custom verifiers.  If a custom verifier supports verify instead of compare, it
probably means the results of two runs cannot be compared (due to some non-determinism) such that even sorting the
inputs won't help.  Similarly if the custom verifier is nullptr that means probably nothing can be done at all.

In these cases we want to still run the custom verifier in verifySortedAggregation, it's only if the custom verifier supports
compare that we want to remove it.

This change makes it so that verifySortedAggregation preserves custom verifiers if they support verify or are nullptr.

As part of this change I removed some single element vectors of custom verifiers we were passing around as that
complicates the logic (e.g. if the vector had multiple verifiers, what if we wanted to preserve one and not another).  Since
they only ever contain a single value, it's easier to just pass the value by reference.

This further allowed me to simplify a few other points in the code.

Reviewed By: kgpai

Differential Revision: D55455819

fbshipit-source-id: b2207a6cf467bd8526f555c88874cdba4c832064
  • Loading branch information
Kevin Wilfong authored and facebook-github-bot committed Apr 2, 2024
1 parent f315052 commit 476ad15
Showing 1 changed file with 117 additions and 106 deletions.
Loading

0 comments on commit 476ad15

Please sign in to comment.