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: truncate time part for current_date columns #54045

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

tangenta
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #53746

Problem Summary:

When TiDB uses current_date as default value, "hour:minuate:second" is not truncated correctly. As a result, the queries with equal condition cannot match.

What changed and how does it work?

Truncate time part for current_date.

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.

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 ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 17, 2024
Copy link

tiprow bot commented Jun 17, 2024

Hi @tangenta. 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-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 17, 2024
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.

Project coverage is 56.4750%. Comparing base (3e180e2) to head (7890711).
Report is 1029 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #54045         +/-   ##
=================================================
- Coverage   72.5840%   56.4750%   -16.1090%     
=================================================
  Files          1515       1637        +122     
  Lines        434637     615169     +180532     
=================================================
+ Hits         315477     347417      +31940     
- Misses        99700     244468     +144768     
- Partials      19460      23284       +3824     
Flag Coverage Δ
integration 38.3133% <72.7272%> (?)
unit 71.5024% <72.7272%> (-0.0767%) ⬇️

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

Components Coverage Δ
dumpling 52.9656% <ø> (ø)
parser ∅ <ø> (∅)
br 50.5793% <ø> (+8.2440%) ⬆️

@Defined2014 Defined2014 requested a review from XuHuaiyu June 18, 2024 02:29
Copy link

ti-chi-bot bot commented Jun 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Defined2014, XuHuaiyu

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:

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 approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 21, 2024
Copy link

ti-chi-bot bot commented Jun 21, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-17 06:40:14.288960121 +0000 UTC m=+10540.774448955: ☑️ agreed by Defined2014.
  • 2024-06-21 07:52:19.753633539 +0000 UTC m=+360466.239122373: ☑️ agreed by XuHuaiyu.

@ti-chi-bot ti-chi-bot bot merged commit 4d8e1d5 into pingcap:master Jun 21, 2024
22 of 23 checks passed
@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Jul 11, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #54575.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jul 11, 2024
@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. label Jul 26, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #54946.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jul 26, 2024
@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. label Oct 28, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #56890.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The query is inconsistent with MySQL when using the default value of the current_date() column in the function
4 participants