tidb icon indicating copy to clipboard operation
tidb copied to clipboard

*: create the predicate_stats and add the interfaces of write/read/delete the records in this table(no caching implementation)

Open zimulala opened this issue 2 years ago • 6 comments

What problem does this PR solve?

Issue Number: ref https://github.com/pingcap/tidb/issues/46773

Problem Summary:

  • Create mysql.predicate_stats table
  • Add the interfaces of write/read/delete the records in this table
    • func UpdatePredicateStatsMeta(sctx sessionctx.Context,startTS uint64,delta variable.ReadTableDelta) (err error)
    • func LoadHistogram(sctx sessionctx.Context, tableID int64, isIndex int, histID int64, tableInfo *model.TableInfo) (*statistics.Histogram, error)
    • gcPredicateStatsFromKV(sctx sessionctx.Context, physicalID int64) (err error)

What changed and how does it work?

Check List

Tests

  • [x] Unit test
  • [ ] Integration test
  • [ ] Manual test (add detailed scripts or steps below)
  • [ ] No need to test
    • [ ] I checked and no code files have been changed.

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

Please refer to Release Notes Language Style Guide to write a quality release note.

None

zimulala avatar Nov 28 '23 11:11 zimulala

Hi @zimulala. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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 kubernetes/test-infra repository.

tiprow[bot] avatar Nov 28 '23 11:11 tiprow[bot]

Codecov Report

Attention: Patch coverage is 4.65116% with 41 lines in your changes missing coverage. Please review.

Project coverage is 72.6306%. Comparing base (d0feede) to head (9cebd85). Report is 2970 commits behind head on master.

:exclamation: Current head 9cebd85 differs from pull request most recent head 361de4f

Please upload reports for the commit 361de4f to get more accurate results.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #48979        +/-   ##
================================================
+ Coverage   70.9679%   72.6306%   +1.6627%     
================================================
  Files          1368       1389        +21     
  Lines        405015     413686      +8671     
================================================
+ Hits         287431     300463     +13032     
+ Misses        97551      94252      -3299     
+ Partials      20033      18971      -1062     
Flag Coverage Δ
integration 43.6290% <4.6511%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 48.4349% <ø> (-4.6170%) :arrow_down:

codecov[bot] avatar Nov 28 '23 11:11 codecov[bot]

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ghazalfamilyusa Once this PR has been reviewed and has the lgtm label, please ask for approval from zimulala and additionally assign easonn7 for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

ti-chi-bot[bot] avatar Dec 03 '23 23:12 ti-chi-bot[bot]

@ghazalfamilyusa: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

LGT but please get it reviewed from DDL team + Barry to make sure the write path is good.

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 kubernetes/test-infra repository.

ti-chi-bot[bot] avatar Dec 03 '23 23:12 ti-chi-bot[bot]

PR needs rebase.

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 kubernetes/test-infra repository.

ti-chi-bot[bot] avatar Dec 08 '23 08:12 ti-chi-bot[bot]

@zimulala: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/build 361de4f4dfdf5c70b0e6678341f7eacafb356ecd link true /test build
idc-jenkins-ci-tidb/check_dev 361de4f4dfdf5c70b0e6678341f7eacafb356ecd link true /test check-dev
pull-integration-ddl-test 361de4f4dfdf5c70b0e6678341f7eacafb356ecd link true /test pull-integration-ddl-test
pull-mysql-client-test 361de4f4dfdf5c70b0e6678341f7eacafb356ecd link true /test pull-mysql-client-test
idc-jenkins-ci-tidb/mysql-test 361de4f4dfdf5c70b0e6678341f7eacafb356ecd link true /test mysql-test
idc-jenkins-ci-tidb/check_dev_2 361de4f4dfdf5c70b0e6678341f7eacafb356ecd link true /test check-dev2
idc-jenkins-ci-tidb/unit-test 361de4f4dfdf5c70b0e6678341f7eacafb356ecd link true /test unit-test
pull-br-integration-test 361de4f4dfdf5c70b0e6678341f7eacafb356ecd link true /test pull-br-integration-test
pull-lightning-integration-test 361de4f4dfdf5c70b0e6678341f7eacafb356ecd link true /test pull-lightning-integration-test
pull-integration-e2e-test 361de4f4dfdf5c70b0e6678341f7eacafb356ecd link true /test pull-integration-e2e-test

Full PR test history. Your PR dashboard.

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 kubernetes/test-infra repository. I understand the commands that are listed here.

ti-chi-bot[bot] avatar Nov 18 '24 07:11 ti-chi-bot[bot]