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

plan: statsInfo.count for LogicalTableDual should be its RowCount #6190

Merged
merged 6 commits into from
Mar 30, 2018

Conversation

zz-jason
Copy link
Member

Implement deriveStats for LogicalTableDualto make statsInfo.count be its RowCount.
Before this PR:

TiDB(localhost) > desc select * from t where 1 = 0;
+--------------+--------------+-------------+------+--------------------+-------+
| id           | parents      | children    | task | operator info      | count |
+--------------+--------------+-------------+------+--------------------+-------+
| TableDual_6  | Projection_5 |             | root | rows:0             | 1.00  |
| Projection_5 |              | TableDual_6 | root | test.t.a, test.t.b | 1.00  |
+--------------+--------------+-------------+------+--------------------+-------+
2 rows in set (0.00 sec)

After this PR:

TiDB(localhost) > desc select * from t where 1 = 0;
+--------------+--------------+-------------+------+--------------------+-------+
| id           | parents      | children    | task | operator info      | count |
+--------------+--------------+-------------+------+--------------------+-------+
| TableDual_6  | Projection_5 |             | root | rows:0             | 0.00  |
| Projection_5 |              | TableDual_6 | root | test.t.a, test.t.b | 0.00  |
+--------------+--------------+-------------+------+--------------------+-------+
2 rows in set (0.00 sec)

@zz-jason
Copy link
Member Author

/run-all-tests

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

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

LGTM

@winoros winoros added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 30, 2018
Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

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

LGTM

@zimulala zimulala added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 30, 2018
@zz-jason zz-jason merged commit 83ea321 into pingcap:master Mar 30, 2018
@zz-jason zz-jason deleted the dev/plan/tabledual branch March 30, 2018 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants