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

executor: show CARTESIAN Join explicitly in the results of Explain #11415

Merged
merged 8 commits into from Jul 24, 2019

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Jul 24, 2019

What problem does this PR solve?

Show the keyword CARTESIAN if a Join operation is a cartesian join in the results of Explain.

After this PR:

mysql> explain select * from t t1, t t2 where t1.k1>t2.k1;
+------------------------+-------+------+-----------------------------------------------------------------------------------+
| id                     | count | task | operator info                                                                     |
+------------------------+-------+------+-----------------------------------------------------------------------------------+
| HashLeftJoin_8         | 1.00  | root | CARTESIAN inner join, inner:IndexReader_13, other cond:gt(test.t1.k1, test.t2.k1) |
| ├─IndexReader_11       | 1.00  | root | index:IndexScan_10                                                                |
| │ └─IndexScan_10       | 1.00  | cop  | table:t1, index:k1, k2, range:[-inf,+inf], keep order:false, stats:pseudo         |
| └─IndexReader_13       | 1.00  | root | index:IndexScan_12                                                                |
|   └─IndexScan_12       | 1.00  | cop  | table:t2, index:k1, k2, range:[-inf,+inf], keep order:false, stats:pseudo         |
+------------------------+-------+------+-----------------------------------------------------------------------------------+

What is changed and how it works?

  1. Use equal conditions in a Join to judge if it is a cartesian join;
  2. Update some unit tests and explain tests;

Check List

Tests

  • Unit test

@qw4990 qw4990 added the sig/execution SIG execution label Jul 24, 2019
Copy link
Contributor

@alivxxx alivxxx left a comment

Choose a reason for hiding this comment

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

LGTM

@alivxxx alivxxx added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 24, 2019
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added status/can-merge Indicates a PR has been approved by a committer. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 24, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Jul 24, 2019

/run-all-tests

@codecov
Copy link

codecov bot commented Jul 24, 2019

Codecov Report

Merging #11415 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #11415   +/-   ##
===========================================
  Coverage   81.4028%   81.4028%           
===========================================
  Files           424        424           
  Lines         90799      90799           
===========================================
  Hits          73913      73913           
  Misses        11579      11579           
  Partials       5307       5307

@sre-bot
Copy link
Contributor

sre-bot commented Jul 24, 2019

success

@sre-bot
Copy link
Contributor

sre-bot commented Jul 24, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Jul 24, 2019

@qw4990 merge failed.

@qw4990
Copy link
Contributor Author

qw4990 commented Jul 24, 2019

/run-unit-test

@qw4990
Copy link
Contributor Author

qw4990 commented Jul 24, 2019

/run-integration-common-test

@qw4990 qw4990 merged commit b97c043 into pingcap:master Jul 24, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Jul 24, 2019

cherry pick to release-3.0 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. type/enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants