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

refine handleJoin #4722

Merged
merged 46 commits into from
May 24, 2022
Merged

refine handleJoin #4722

merged 46 commits into from
May 24, 2022

Conversation

SeaRise
Copy link
Contributor

@SeaRise SeaRise commented Apr 20, 2022

What problem does this PR solve?

Issue Number: ref #4118

Problem Summary:

What is changed and how it works?

  • move set concurrency and init pool from Join.ctor to Join.init
    • In order to split the logic of expressionActions generation and the logic of inputStream generation
  • move some codes from handleJoin to JoinInterpreterHelper
  • refactor the code of handleJoin like
String match_helper_name = genMatchHelperName(xx);
NamesAndTypesList columns_added_by_join = genColumnsAddedByJoin(xxx);
NamesAndTypes join_output_columns = genJoinOutputColumns(xxx);

// for probe
prepareJoin(xxx);
// for build
prepareJoin(xxx);

auto [other_condition_expr, other_filter_column_name, other_eq_filter_from_in_column_name] = genJoinOtherConditionAction(xxx);

auto join_ptr = Join{xxxxx};

// build side streams
build_pipeline.transform(xxx);
// probe side streams
probe_pipeline.transform(xxx);

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 Apr 20, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • LittleFall
  • windtalker

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 do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 20, 2022
@SeaRise
Copy link
Contributor Author

SeaRise commented Apr 20, 2022

/run-integration-test

@ti-chi-bot ti-chi-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 20, 2022
@SeaRise
Copy link
Contributor Author

SeaRise commented Apr 20, 2022

/run-integration-test

@SeaRise
Copy link
Contributor Author

SeaRise commented Apr 20, 2022

/run-integration-test

@SeaRise
Copy link
Contributor Author

SeaRise commented Apr 20, 2022

/run-integration-test

@SeaRise
Copy link
Contributor Author

SeaRise commented Apr 21, 2022

/run-integration-test

@ywqzzy ywqzzy self-requested a review April 21, 2022 03:42
@SeaRise
Copy link
Contributor Author

SeaRise commented Apr 21, 2022

/run-integration-test

@SeaRise
Copy link
Contributor Author

SeaRise commented Apr 21, 2022

/run-integration-test

@SeaRise
Copy link
Contributor Author

SeaRise commented Apr 21, 2022

/run-integration-test

@ti-chi-bot ti-chi-bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 17, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 18, 2022
@SeaRise
Copy link
Contributor Author

SeaRise commented May 23, 2022

/hold cancel

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 23, 2022
@SeaRise
Copy link
Contributor Author

SeaRise commented May 23, 2022

/run-integration-test

@SeaRise
Copy link
Contributor Author

SeaRise commented May 23, 2022

/merge

@ti-chi-bot
Copy link
Member

@SeaRise: 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 ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 23, 2022
@SeaRise
Copy link
Contributor Author

SeaRise commented May 23, 2022

wait for #4961
fix clang tidy err

@SeaRise
Copy link
Contributor Author

SeaRise commented May 23, 2022

/hold

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 23, 2022
@SeaRise SeaRise removed the status/can-merge Indicates a PR has been approved by a committer. label May 23, 2022
@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 23, 2022
@SeaRise
Copy link
Contributor Author

SeaRise commented May 23, 2022

/merge cancel

@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label May 23, 2022
@sre-bot
Copy link
Collaborator

sre-bot commented May 23, 2022

Coverage for changed files

Filename                                           Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Flash/Coprocessor/DAGQueryBlockInterpreter.cpp         229                80    65.07%          38                 4    89.47%         535               125    76.64%         138                55    60.14%
Flash/Coprocessor/DAGQueryBlockInterpreter.h             2                 0   100.00%           2                 0   100.00%           2                 0   100.00%           0                 0         -
Flash/Coprocessor/JoinInterpreterHelper.cpp            119                37    68.91%          17                 0   100.00%         258                67    74.03%          96                49    48.96%
Flash/Coprocessor/JoinInterpreterHelper.h               28                 5    82.14%           8                 0   100.00%          16                 0   100.00%          22                12    45.45%
Interpreters/ExpressionAnalyzer.cpp                   1186              1186     0.00%          75                75     0.00%        1954              1954     0.00%        1012              1012     0.00%
Interpreters/Join.cpp                                 1282              1103    13.96%          82                62    24.39%        1426              1205    15.50%         864               754    12.73%
Interpreters/Join.h                                     19                14    26.32%          16                13    18.75%          28                22    21.43%           2                 1    50.00%
Storages/StorageJoin.cpp                                50                49     2.00%           6                 5    16.67%         120                69    42.50%          30                30     0.00%
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                 2915              2474    15.13%         244               159    34.84%        4339              3442    20.67%        2164              1913    11.60%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18247      9787             46.36%    204276  97976        52.04%

full coverage report (for internal network access only)

@SeaRise
Copy link
Contributor Author

SeaRise commented May 24, 2022

/hold cancel

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 24, 2022
@SeaRise
Copy link
Contributor Author

SeaRise commented May 24, 2022

/merge

@ti-chi-bot
Copy link
Member

@SeaRise: 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: d7852c7

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 24, 2022
@sre-bot
Copy link
Collaborator

sre-bot commented May 24, 2022

Coverage for changed files

Filename                                           Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Flash/Coprocessor/DAGQueryBlockInterpreter.cpp         229                80    65.07%          38                 4    89.47%         535               125    76.64%         138                55    60.14%
Flash/Coprocessor/DAGQueryBlockInterpreter.h             2                 0   100.00%           2                 0   100.00%           2                 0   100.00%           0                 0         -
Flash/Coprocessor/JoinInterpreterHelper.cpp            119                37    68.91%          17                 0   100.00%         258                67    74.03%          96                49    48.96%
Flash/Coprocessor/JoinInterpreterHelper.h               28                 5    82.14%           8                 0   100.00%          16                 0   100.00%          22                12    45.45%
Interpreters/ExpressionAnalyzer.cpp                   1186              1186     0.00%          75                75     0.00%        1954              1954     0.00%        1012              1012     0.00%
Interpreters/Join.cpp                                 1282              1103    13.96%          82                62    24.39%        1425              1205    15.44%         864               754    12.73%
Interpreters/Join.h                                     19                14    26.32%          16                13    18.75%          28                22    21.43%           2                 1    50.00%
Storages/StorageJoin.cpp                                50                49     2.00%           6                 5    16.67%         120                69    42.50%          30                30     0.00%
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                 2915              2474    15.13%         244               159    34.84%        4338              3442    20.65%        2164              1913    11.60%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18243      9785             46.36%    204103  97994        51.99%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit 64a747a into pingcap:master May 24, 2022
@SeaRise SeaRise deleted the refine_interpreter_join branch May 24, 2022 07:21
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/XXL Denotes a PR that changes 1000+ 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.

6 participants