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

Optimizer: add test cases for predicate simplifications #40775

Conversation

ghazalfamilyusa
Copy link
Contributor

@ghazalfamilyusa ghazalfamilyusa commented Jan 25, 2023

Issue Number: ref #40221

Problem Summary:
This PR just adds tests of various predicate simplification optimizations cases. The purpose of the test is to
(1) document existing cases. This include (a) removing redundancy for identical simple predicates
like =, <>, > and <, >= and <=, (b) un-satisfiable conditions like x=1 and x <> 1 (c) intersection of two in lists.
(2) list cases not working currently and should be addressed in future optimizations. These cases cover
the use case in #40221) and more like intersection of two "not in" lists.
(3) establish a place holder for predicate simplification is a general optimizer rewrite rule and sub-rules.

Tests

  • [] Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 25, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • fixdb
  • hawkingrei

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jan 25, 2023
@sre-bot
Copy link
Contributor

sre-bot commented Jan 25, 2023

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 25, 2023
@ghazalfamilyusa ghazalfamilyusa force-pushed the predicate_simplification_test branch 2 times, most recently from ee43901 to 7e3cacb Compare January 26, 2023 00:59
@ghazalfamilyusa ghazalfamilyusa requested a review from fixdb January 26, 2023 02:12
@fixdb
Copy link
Contributor

fixdb commented Jan 27, 2023

Please sign the CLA and remove the unintentional change, other than that, looks good to me!

@ghazalfamilyusa ghazalfamilyusa force-pushed the predicate_simplification_test branch from 7e3cacb to 844170f Compare January 27, 2023 01:17
@ghazalfamilyusa
Copy link
Contributor Author

Please sign the CLA and remove the unintentional change, other than that, looks good to me!

Removed the unintentional change. For CLA, I signed it yesterday and still showing it is pending. To make sure, I added my ping cap email [email protected] to my github account.

Copy link
Contributor

@fixdb fixdb left a comment

Choose a reason for hiding this comment

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

+1
LGTM. We may need help from IT about the CLA.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 27, 2023
@ghazalfamilyusa
Copy link
Contributor Author

ghazalfamilyusa commented Jan 27, 2023 via email

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jan 28, 2023
@qw4990 qw4990 added the sig/planner SIG: Planner label Jan 28, 2023
@Reminiscent
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 127ad80c2739ec9fab649907cdeda8310b3d492b

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 28, 2023
@ti-chi-bot
Copy link
Member

@ghazalfamilyusa: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@hawkingrei
Copy link
Member

/hold Please resolve the CLA problem.

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 28, 2023
@ghazalfamilyusa ghazalfamilyusa force-pushed the predicate_simplification_test branch from 0fc3ee5 to 7046410 Compare January 31, 2023 19:11
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Jan 31, 2023
@ti-chi-bot
Copy link
Member

Merge canceled because a new commit is pushed.

solotzg and others added 26 commits February 6, 2023 08:57
@ghazalfamilyusa ghazalfamilyusa force-pushed the predicate_simplification_test branch from b0fb538 to b01d576 Compare February 6, 2023 16:59
@ghazalfamilyusa ghazalfamilyusa deleted the predicate_simplification_test branch February 6, 2023 17:02
@ghazalfamilyusa
Copy link
Contributor Author

Process got complicated when a different email is used for the commit. Will do another clean PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.