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

Ut/daymonthyear #3688

Merged
merged 15 commits into from
Dec 24, 2021
Merged

Ut/daymonthyear #3688

merged 15 commits into from
Dec 24, 2021

Conversation

bestwoody
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #3519 #3520 #3521

Problem Summary:

What is changed and how it works?

Check List

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

Add unit tests for function day(), month() and year().

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Dec 20, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • XuHuaiyu

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 Denotes a PR that will be considered when it comes time to generate release notes. label Dec 20, 2021
@bestwoody bestwoody requested a review from windtalker December 20, 2021 08:11
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 20, 2021
@windtalker windtalker requested review from wshwsh12 and removed request for windtalker December 24, 2021 02:41
}


template <bool isconst, bool nullable, typename DT, typename V>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is typename V useless?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's usefull. V raw_input



// Scan day, month and year. There is no matter if the Date/DateTime is invalid,
// since you can just ignore the invalid cases,
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not really understand what will happen if the input is "2020-02-30".
Why the test framework works fine for this case?

Copy link
Contributor Author

@bestwoody bestwoody Dec 24, 2021

Choose a reason for hiding this comment

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

Actually, it doesn't matter whether it's true or not when the input is "2020-02-30". Since we won't test it, if we only generate and test valid cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not really understand what will happen if the input is "2020-02-30". Why the test framework works fine for this case?

I think the reason is that it only extract member's info.

Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 24, 2021
@bestwoody
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@bestwoody: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and 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.

If you have any questions about the PR merge process, please refer to pr process.

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.

@ti-chi-bot
Copy link
Member

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

Commit hash: cf71742

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 24, 2021
@sre-bot
Copy link
Collaborator

sre-bot commented Dec 24, 2021

Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/623/cobertura/
(Coverage detail url is limited office network access)

lines: 42.7% (48157 out of 112711)
branches: 6.1% (74548 out of 1213129)

@ti-chi-bot ti-chi-bot merged commit 7c8d5ae into pingcap:master Dec 24, 2021
@bestwoody bestwoody deleted the ut/daymonthyear branch December 24, 2021 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add unit test for Time function year
4 participants