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

infoschema: support define decimal for virtual table in information_schema #14896

Merged
merged 1 commit into from
Feb 21, 2020
Merged

infoschema: support define decimal for virtual table in information_schema #14896

merged 1 commit into from
Feb 21, 2020

Conversation

lonng
Copy link
Contributor

@lonng lonng commented Feb 21, 2020

Signed-off-by: Lonng heng@lonng.org

What problem does this PR solve?

This PR changes the columnInfo definition in the infoschema package and add a field decimal to this struct because some table needs to define the decimal of value.

And this PR delete the unuseful field elems.

What is changed and how it works?

  1. Add a field decimal for struct columnInfo.
  2. Use field initializer for columnInfo and delete the fields which have default value.

Check List

Tests

  • Unit test

Before this PR

| read-link | localhost:20180 | tikv_grpc_req_batch_size               |                                         |     0.99 |     1.8159727508612207 |      1.6320000000000003 |     1.9061904761904764 |
| read-link | localhost:20180 | tikv_grpc_resp_batch_size              |                                         |     0.99 |     1.7700137961869462 |      1.4650000000000096 |     1.8888888888888888 |
| read-link | localhost:10080 | tidb_cop_duration                      |                                         |     0.99 |   0.007507018735744536 |   0.0022799999999999878 |   0.051039999999999905 |
| read-link | localhost:20180 | tikv_cop_wait_duration                 | index                                   |     0.99 |   0.005916703859976283 |   0.0009855882352941177 |     0.0486400000000001 |
| read-link | localhost:20180 | tikv_cop_wait_duration                 | select                                  |     0.99 |  0.0025532449039733186 |             0.000976875 |   0.013040000000000013 |
| read-link | localhost:20180 | tikv_cop_handle_duration               | index                                   |     0.99 |   0.000981563954059329 |   0.0009705555555555557 |  0.0009883333333333335 |
| read-link | localhost:20180 | tikv_cop_handle_duration               | select                                  |     0.99 |  0.0009825811178332529 |   0.0009549999999999999 |                0.00099 |
| read-link | localhost:20180 | tikv_cop_kv_cursor_operations          | index                                   |     0.99 |     1.9666665041947302 |       1.962666666666667 |     1.9700000000000002 |
| read-link | localhost:20180 | tikv_cop_kv_cursor_operations          | select                                  |     0.99 |     2.3957500729820453 |                1.973125 |                   6.48 |
| read-link | localhost:20180 | tikv_cop_request_duration              | index                                   |     0.99 |   0.006183691322898403 |   0.0009924193548387097 |     0.0486400000000001 |
| read-link | localhost:20180 | tikv_cop_request_duration              | select                                  |     0.99 |   0.002799206018446358 |    0.000990263157894737 |   0.013040000000000013 |
| read-link | localhost:20180 | tikv_cop_request_durations             | index                                   |     NULL |     1.0565660570594855 |     0.13333037043621251 |     1.2444997555446908 |
| read-link | localhost:20180 | tikv_cop_request_durations             | select                                  |     NULL |     0.8133076072877152 |     0.13333629636214137 |     1.0000444464198408 |

After this PR

| read-link | localhost:20180 | tikv_cop_total_kv_cursor_operations    | select                                  |     NULL |      1.000767 |      0.933333 |      1.066785 |
| read-link | localhost:20180 | tikv_cop_total_requests                | index                                   |     NULL |      1.005068 |      0.933375 |      1.066785 |
| read-link | localhost:20180 | tikv_cop_total_requests                | select                                  |     NULL |      0.737671 |      0.688889 |      0.800036 |
| read-link | localhost:20180 | tikv_cop_total_response_size           |                                         |     NULL |    147.697741 |    147.390174 |    150.416713 |
| read-link | localhost:20180 | tikv_cop_total_rocksdb_perf_statistics | index, block_cache_hit_count            |     NULL |      3.014488 |      2.822348 |      3.200142 |
| read-link | localhost:20180 | tikv_cop_total_rocksdb_perf_statistics | index, block_read_byte                  |     NULL |      0.000000 |      0.000000 |      0.000000 |
| read-link | localhost:20180 | tikv_cop_total_rocksdb_perf_statistics | index, block_read_count                 |     NULL |      0.000000 |      0.000000 |      0.000000 |
| read-link | localhost:20180 | tikv_cop_total_rocksdb_perf_statistics | index, internal_delete_skipped_count    |     NULL |      0.000000 |      0.000000 |      0.000000 |
| read-link | localhost:20180 | tikv_cop_total_rocksdb_perf_statistics | index, internal_key_skipped_count       |     NULL |      1.006502 |      0.911152 |      1.133384 |
| read-link | localhost:20180 | tikv_cop_total_rocksdb_perf_statistics | select, block_cache_hit_count           |     NULL |      2.148495 |      2.000000 |      2.355660 |
| read-link | localhost:20180 | tikv_cop_total_rocksdb_perf_statistics | select, block_read_byte                 |     NULL |      0.000000 |      0.000000 |      0.000000 |
| read-link | localhost:20180 | tikv_cop_total_rocksdb_perf_statistics | select, block_read_count                |     NULL |      0.000000 |      0.000000 |      0.000000 |

Release note

  • No need.

@lonng lonng added type/enhancement The issue or PR belongs to an enhancement. component/infoschema labels Feb 21, 2020
@lonng lonng added this to the v4.0.0-beta.1 milestone Feb 21, 2020
@lonng
Copy link
Contributor Author

lonng commented Feb 21, 2020

/run-all-tests

Copy link
Contributor

@crazycs520 crazycs520 left a comment

Choose a reason for hiding this comment

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

LGTM

@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao tiancaiamao added the status/LGT2 Indicates that a PR has LGTM 2. label Feb 21, 2020
@lonng
Copy link
Contributor Author

lonng commented Feb 21, 2020

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 21, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Feb 21, 2020

/run-all-tests

@lonng
Copy link
Contributor Author

lonng commented Feb 21, 2020

/rebuild

@zimulala zimulala merged commit 61ac7ce into pingcap:master Feb 21, 2020
@lonng lonng deleted the support-decimal branch February 21, 2020 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/infoschema status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants