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

Test: Support running raw query in Executor UT. #6085

Merged
merged 7 commits into from
Oct 17, 2022

Conversation

ywqzzy
Copy link
Contributor

@ywqzzy ywqzzy commented Oct 8, 2022

What problem does this PR solve?

Issue Number: ref #4609

Problem Summary:

What is changed and how it works?

  1. Add interface for Executor tests to run raw query.
  2. Add table_infos map to store TableInfo for compileQuery().

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Oct 8, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Lloyd-Pottiger
  • SeaRise

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 8, 2022
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Oct 8, 2022

/run-all-tests

@ywqzzy
Copy link
Contributor Author

ywqzzy commented Oct 8, 2022

/rebuild

@ywqzzy
Copy link
Contributor Author

ywqzzy commented Oct 8, 2022

/run-integration-test

@ywqzzy
Copy link
Contributor Author

ywqzzy commented Oct 8, 2022

/run-integration-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Oct 8, 2022

Coverage for changed files

Filename                                 Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Debug/MockStorage.cpp                         45                 6    86.67%          17                 0   100.00%         122                 6    95.08%          24                 6    75.00%
Debug/MockStorage.h                            1                 0   100.00%           1                 0   100.00%           3                 0   100.00%           0                 0         -
Debug/dbgFuncCoprocessor.cpp                 437               303    30.66%          46                28    39.13%         934               573    38.65%         294               205    30.27%
Flash/tests/gtest_join_executor.cpp          119                63    47.06%          12                 0   100.00%         352                 0   100.00%          46                36    21.74%
Flash/tests/gtest_limit_executor.cpp          40                14    65.00%           4                 0   100.00%          39                 0   100.00%          18                 8    55.56%
TestUtils/ExecutorTestUtils.cpp               69                10    85.51%          22                 2    90.91%         229                37    83.84%          50                 6    88.00%
TestUtils/ExecutorTestUtils.h                  3                 1    66.67%           3                 1    66.67%          18                13    27.78%           0                 0         -
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                        714               397    44.40%         105                31    70.48%        1697               629    62.93%         432               261    39.58%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18394      7442             59.54%    215533  76426        64.54%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 8, 2022
@ywqzzy ywqzzy marked this pull request as ready for review October 8, 2022 07:13
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 8, 2022
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Oct 8, 2022

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Oct 8, 2022

Coverage for changed files

Filename                                 Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Debug/MockStorage.cpp                         45                 6    86.67%          17                 0   100.00%         122                 6    95.08%          24                 6    75.00%
Debug/MockStorage.h                            1                 0   100.00%           1                 0   100.00%           3                 0   100.00%           0                 0         -
Debug/dbgFuncCoprocessor.cpp                 437               303    30.66%          46                28    39.13%         934               573    38.65%         294               205    30.27%
Flash/tests/gtest_join_executor.cpp          119                63    47.06%          12                 0   100.00%         352                 0   100.00%          46                36    21.74%
Flash/tests/gtest_limit_executor.cpp          40                14    65.00%           4                 0   100.00%          39                 0   100.00%          18                 8    55.56%
TestUtils/ExecutorTestUtils.cpp               69                10    85.51%          22                 2    90.91%         229                37    83.84%          50                 6    88.00%
TestUtils/ExecutorTestUtils.h                  3                 1    66.67%           3                 1    66.67%          18                13    27.78%           0                 0         -
TestUtils/mockExecutor.cpp                    71                 3    95.77%          44                 1    97.73%         276                24    91.30%          30                 2    93.33%
TestUtils/mockExecutor.h                      14                 4    71.43%          14                 4    71.43%          32                 6    81.25%           0                 0         -
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                        799               404    49.44%         163                36    77.91%        2005               659    67.13%         462               263    43.07%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18394      7444             59.53%    215522  76503        64.50%

full coverage report (for internal network access only)

@ywqzzy
Copy link
Contributor Author

ywqzzy commented Oct 9, 2022

After this pr, we can move some of the executor tests in delta-merge-test/query into gtest.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 9, 2022
@ywqzzy ywqzzy requested a review from windtalker October 9, 2022 07:20
Co-authored-by: Lloyd-Pottiger <60744015+Lloyd-Pottiger@users.noreply.github.com>
@ti-chi-bot ti-chi-bot removed the status/LGT1 Indicates that a PR has LGTM 1. label Oct 17, 2022
@ti-chi-bot ti-chi-bot added the status/LGT2 Indicates that a PR has LGTM 2. label Oct 17, 2022
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Oct 17, 2022

/merge

@ti-chi-bot
Copy link
Member

@ywqzzy: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 66b5779

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Oct 17, 2022
@SeaRise
Copy link
Contributor

SeaRise commented Oct 17, 2022

/rebuild

@SeaRise
Copy link
Contributor

SeaRise commented Oct 17, 2022

/run-integration-test

@ti-chi-bot ti-chi-bot merged commit a57e4b1 into pingcap:master Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants