Skip to content

Push down ROUND(x) on decimal types (#2492)#2611

Closed
ti-srebot wants to merge 2 commits intopingcap:release-5.1from
ti-srebot:release-5.1-4997809a0ad6
Closed

Push down ROUND(x) on decimal types (#2492)#2611
ti-srebot wants to merge 2 commits intopingcap:release-5.1from
ti-srebot:release-5.1-4997809a0ad6

Conversation

@ti-srebot
Copy link
Collaborator

@ti-srebot ti-srebot commented Aug 6, 2021

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

# In tics repo:
git pr https://github.com/pingcap/tics/pull/2611

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

git push git@github.com:ti-srebot/tics.git pr/2611:release-5.1-4997809a0ad6

What problem does this PR solve?

Issue Number: close #2426, part of #2550

Problem Summary: enable ROUND(x) on TiFlash.

What is changed and how it works?

What's Changed:

  • IDataType.h , DataTypesNumber.h: add isFloatingPoint.
  • DAGExpressionAnalyzer.cpp: construct tidbRound from tidbRoundWithFrac.
  • DAGUtils.cpp: map TiPB codes to function names.
  • FunctionsArithmetic.h, toUnsigned.h: move out toUnsigned for reusing in FunctionsRound.h.
  • FunctionsRound.cpp: register new function.
  • FunctionsRound.h: the implementation.

Related changes

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

Check List

Tests

  • Unit test
  • Integration test

Release note

  • Support pushing down ROUND(X) to TiFlash.

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot ti-srebot added CHERRY-PICK cherry pick component/expression type/enhancement The issue or PR belongs to an enhancement. labels Aug 6, 2021
@ti-srebot ti-srebot requested a review from fuzhe1989 August 6, 2021 09:05
@ti-srebot ti-srebot added this to the v5.1.2 milestone Aug 6, 2021
@JaySon-Huang JaySon-Huang modified the milestones: v5.1.2, v5.1.3 Oct 11, 2021
@fuzhe1989 fuzhe1989 closed this Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CHERRY-PICK cherry pick component/expression type/enhancement The issue or PR belongs to an enhancement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants