Skip to content
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

Support explain verification #15101

Merged
merged 6 commits into from
Sep 10, 2020
Merged

Support explain verification #15101

merged 6 commits into from
Sep 10, 2020

Conversation

caithagoras
Copy link
Contributor

@caithagoras caithagoras commented Sep 1, 2020

Add a new functionality to the verifier to allow explain verification.

For each query pairs to be verified, explain both control and test, and
compare the query plans. Verification is marked as succeeded as long as
the test query can be explained.

Introduced a new field matchType in the output event, which can be used
to indicate whether there is plan difference.

For non-DML queries, we don't care much about plan difference and hence
the control query and the plan comparison are skipped.

== RELEASE NOTES ==

Verifier Changes
* Add support to run explain verification. (:pr:`15101`). This can be enabled by configuration property ``explain``.

@caithagoras caithagoras changed the title [WIP Support explain verification [WIP] Support explain verification Sep 1, 2020
@caithagoras caithagoras changed the title [WIP] Support explain verification Support explain verification Sep 1, 2020
@caithagoras caithagoras requested review from sujay-jain and removed request for bhhari, tdcmeehan and yingsu00 September 3, 2020 09:14
@sujay-jain
Copy link
Member

Still reviewing - first 2 commits LGTM

Copy link
Member

@sujay-jain sujay-jain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@caithagoras
Copy link
Contributor Author

caithagoras commented Sep 10, 2020

@mbasmanova This PR is ready now. Thank you for helping!

Convert MatchResult to an interface and move the data-verification-
specific implementation of the MatchResult to DataMatchResult.
QueryBundle contained a field tableName, but not all query rewrites
result in queries with a target table. Move the field to a subclass
DataQueryBundle.
Add a new functionality to the verifier to allow explain verification.

For each query pairs to be verified, explain both control and test, and
compare the query plans. Verification is marked as succeeded as long as
the test query can be explained.

Introduced a new field matchType in the output event, which can be used
to indicate whether there is plan difference.

For non-DML queries, we don't care much about plan difference and hence
the control query and plan comparison are skipped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants