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: fix the issue that some extracted conditions are not used in information_schema #55236

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

YangKeao
Copy link
Member

@YangKeao YangKeao commented Aug 6, 2024

What problem does this PR solve?

Issue Number: close #55235

Problem Summary:

Some conditions are just not used in the retriever of information schema tables. This PR adds a test for them, and fixes these issues. These issues are introduced in #54333.

No matter whether an extracted condition is used in the real implementation, the parent executor will not use it to run a SELECTION again, and that's why these issues appear. It's hard to ensure all the conditions are used correctly, so I added a test to automatically test these lines.

What changed and how does it work?

  1. Add a test to automatically generate tables and selecting rows in the information schema to see whether the condition behaves well.
  2. Fix the case when the condition has no effect.

Check List

Tests

  • 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.

Release note

Fix the issue that some SELECT conditions have no effect for some tables in the information_schema.

@YangKeao YangKeao requested review from xhebox, tangenta and ywqzzy August 6, 2024 11:25
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 6, 2024
@YangKeao YangKeao changed the title executor: fix the not used extracted condition executor: fix the issue that some extracted conditions are not used in information_schema Aug 6, 2024
@YangKeao
Copy link
Member Author

YangKeao commented Aug 6, 2024

ref #55162.

Similar issue I fixed before.

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 74.7098%. Comparing base (9fee330) to head (f16d12f).
Report is 13 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55236        +/-   ##
================================================
- Coverage   74.8025%   74.7098%   -0.0927%     
================================================
  Files          1570       1570                
  Lines        364715     441512     +76797     
================================================
+ Hits         272816     329853     +57037     
- Misses        72132      91368     +19236     
- Partials      19767      20291       +524     
Flag Coverage Δ
integration 49.4621% <81.8181%> (?)
unit 71.7783% <81.8181%> (-1.9027%) ⬇️

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

Components Coverage Δ
dumpling 52.9567% <ø> (-2.2327%) ⬇️
parser ∅ <ø> (∅)
br 52.5020% <ø> (+4.8275%) ⬆️

Copy link

tiprow bot commented Aug 6, 2024

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

Test name Commit Details Required Rerun command
fast_test_tiprow f16d12f link true /test fast_test_tiprow

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-sigs/prow repository. I understand the commands that are listed here.

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 7, 2024
Copy link

ti-chi-bot bot commented Aug 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tangenta, tiancaiamao

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [tangenta,tiancaiamao]

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 ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 7, 2024
Copy link

ti-chi-bot bot commented Aug 7, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-07 01:55:31.716838129 +0000 UTC m=+403461.583937216: ☑️ agreed by tangenta.
  • 2024-08-07 02:48:02.718857505 +0000 UTC m=+406612.585956595: ☑️ agreed by tiancaiamao.

@ti-chi-bot ti-chi-bot bot merged commit 7291829 into pingcap:master Aug 7, 2024
22 of 23 checks passed
hawkingrei pushed a commit to hawkingrei/tidb that referenced this pull request Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

constraint_name condition is ignored in KEY_COLUMN_USAGE
3 participants