-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc(fuzzer): Support custom result verifier with compare() API in window fuzzer #12148
Conversation
This pull request was exported from Phabricator. Differential Revision: D68507422 |
✅ Deploy Preview for meta-velox canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great; if you can refactor some of the code under the if blocks so theres less duplication and more readability that would be great.
@@ -1052,27 +1052,6 @@ void AggregationFuzzer::Stats::print(size_t numIterations) const { | |||
AggregationFuzzerBase::Stats::print(numIterations); | |||
} | |||
|
|||
namespace { | |||
// Merges a vector of RowVectors into one RowVector. | |||
RowVectorPtr mergeRowVectors( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone was just asking about a utility like this , thanks for moving it to fuzzer toolkit.
frame); | ||
customVerifierInitialized = true; | ||
} catch (...) { | ||
LOG(WARNING) << "Custom verifier initialization failed"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should we throw instead of just logging as a warning ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we intentionally create some illegal queries in window fuzzer to ensure they don't crash. In that case, the custom verifier initialization may throw, which is expected.
velox/exec/fuzzer/WindowFuzzer.cpp
Outdated
LOG(INFO) << "Verified results against reference DB"; | ||
} else if (referenceQueryRunner_->supportsVeloxVectorResults()) { | ||
if (enableWindowVerification) { | ||
auto prestoQueryRunner = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit code under these if blocks is very similar, maybe we can move some of it to some common function ?
…ndow fuzzer (facebookincubator#12148) Summary: The custom result verifiers of some functions provides a compare() API that can be used to compare the expected and actual results after certain transformation. This is needed for functions like `avg(interval) -> interval` because the result of this function can have a small precision error that should be tolerated. However, the window fuzzer used to only support the verify() API of custom result verifiers. This diff makes the window fuzzer to use the compare() API as well when available. Reviewed By: kgpai Differential Revision: D68507422
bca1f6c
to
cf232ec
Compare
This pull request was exported from Phabricator. Differential Revision: D68507422 |
…ndow fuzzer (facebookincubator#12148) Summary: The custom result verifiers of some functions provides a compare() API that can be used to compare the expected and actual results after certain transformation. This is needed for functions like `avg(interval) -> interval` because the result of this function can have a small precision error that should be tolerated. However, the window fuzzer used to only support the verify() API of custom result verifiers. This diff makes the window fuzzer to use the compare() API as well when available. Reviewed By: kgpai Differential Revision: D68507422
cf232ec
to
ea3116c
Compare
This pull request was exported from Phabricator. Differential Revision: D68507422 |
…ndow fuzzer (facebookincubator#12148) Summary: The custom result verifiers of some functions provides a compare() API that can be used to compare the expected and actual results after certain transformation. This is needed for functions like `avg(interval) -> interval` because the result of this function can have a small precision error that should be tolerated. However, the window fuzzer used to only support the verify() API of custom result verifiers. This diff makes the window fuzzer to use the compare() API as well when available. Reviewed By: kgpai Differential Revision: D68507422
ea3116c
to
0882dd9
Compare
This pull request was exported from Phabricator. Differential Revision: D68507422 |
This pull request has been merged in 419de77. |
Conbench analyzed the 0 benchmark runs that triggered this notification. None of the specified runs were found on the Conbench server. The full Conbench report has more details. |
Summary:
The custom result verifiers of some functions provides a compare() API that can be used to
compare the expected and actual results after certain transformation. This is needed for
functions like
avg(interval) -> interval
because the result of this function can have a smallprecision error that should be tolerated. However, the window fuzzer used to only support
the verify() API of custom result verifiers. This diff makes the window fuzzer to use the
compare() API as well when available.
Differential Revision: D68507422