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

expression: Support Sqrt, Ceil, Floor and CastIntAsReal push down to TiFlash (#25085) #25178

Closed

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Jun 4, 2021

cherry-pick #25085 to release-5.0
You can switch your code base to this Pull Request by using git-extras:

# In tidb repo:
git pr https://github.com/pingcap/tidb/pull/25178

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/tidb.git pr/25178:release-5.0-5e55c2e847ef

What problem does this PR solve?

Related to pingcap/tiflash#1901
Issue Number: close #xxx

Problem Summary:

What is changed and how it works?

What's Changed:
Add Floor, Ceil, Sqrt and CastIntAsReal(for pushing down a sqrt for an int) into scalarExprSupportedByFlash list

How it Works:

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    Use tiflash/integrated/ops or algernon to run a tidb-server and use explain query to make sure corresponding expression is pushed down

Side effects

Release note

  • Pushdown sqrt, ceil, floor and CastIntAsReal to tiflash

@ti-srebot ti-srebot requested a review from a team as a code owner June 4, 2021 15:18
@ti-srebot ti-srebot requested review from qw4990 and removed request for a team June 4, 2021 15:18
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

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-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot added component/expression size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/5.0-cherry-pick labels Jun 4, 2021
@ti-srebot ti-srebot added this to the v5.0.2 milestone Jun 4, 2021
@ti-chi-bot ti-chi-bot removed the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 4, 2021
@ti-srebot
Copy link
Contributor Author

@chAngeZhaoZhanBo please accept the invitation then you can push to the cherry-pick pull requests.
https://github.com/ti-srebot/tidb/invitations

@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 4, 2021
@ti-chi-bot ti-chi-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 17, 2021
@chAngeZhaoZhanBo chAngeZhaoZhanBo force-pushed the release-5.0-5e55c2e847ef branch 2 times, most recently from ffacabb to fe36b13 Compare June 17, 2021 11:48
@ti-chi-bot ti-chi-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 17, 2021
@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 17, 2021
case
ast.LogicOr, ast.LogicAnd, ast.UnaryNot, ast.BitNeg, ast.Xor, ast.And, ast.Or,
ast.GE, ast.LE, ast.EQ, ast.NE, ast.LT, ast.GT, ast.In, ast.IsNull, ast.Like,
ast.Plus, ast.Minus, ast.Div, ast.Mul, /*ast.Mod,*/
ast.If, ast.Ifnull, ast.Case,
ast.Month,
ast.TimestampDiff, ast.DateFormat, ast.FromUnixTime,
ast.Concat, ast.ConcatWS,
Copy link
Contributor

Choose a reason for hiding this comment

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

Concat, ConcatWS, Year, Month, Day, DateDiff should be introduced by #25145.

Rest LGTM.

Copy link
Contributor

Choose a reason for hiding this comment

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

https://github.com/pingcap/tidb/pull/25085/files
Concat, ConcatWS, Year, Month, Day, DateDiff are already there in this PR
Now they are needed to be discarded, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

https://github.com/pingcap/tidb/pull/25085/files
Concat, ConcatWS, Year, Month, Day, DateDiff are already there in this PR
Now they are needed to be discarded, right?

Yes, but they are not in release-5.0 yet...

Copy link
Contributor

Choose a reason for hiding this comment

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

done

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 19, 2021
@ti-chi-bot
Copy link
Member

@ti-srebot: 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.

@qw4990 qw4990 removed their request for review June 23, 2021 03:38
@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label Aug 30, 2021
@zhouqiang-cl zhouqiang-cl removed the cherry-pick-approved Cherry pick PR approved by release team. label Sep 3, 2021
@XuHuaiyu
Copy link
Contributor

New feature, do not need to cherrypick

@XuHuaiyu XuHuaiyu closed this Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/5.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants