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

*:fix a bunch of functions. #3805

Merged
merged 13 commits into from
Jan 17, 2022

Conversation

ywqzzy
Copy link
Contributor

@ywqzzy ywqzzy commented Jan 5, 2022

What problem does this PR solve?

Issue Number: #2315 #2843

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

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 5, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • fuzhe1989

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 release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 5, 2022
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Jan 5, 2022

/cc @fuzhe1989 @SeaRise @JaySon-Huang

dbms/src/Functions/FunctionsConditional.h Outdated Show resolved Hide resolved
dbms/src/Functions/FunctionsDateTime.h Outdated Show resolved Hide resolved
dbms/src/Functions/FunctionsDateTime.h Outdated Show resolved Hide resolved
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Jan 11, 2022

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Jan 11, 2022

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

lines: 43.9% (49989 out of 113973)
branches: 6.5% (81346 out of 1257030)

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 11, 2022
@@ -1565,8 +1562,7 @@ class FunctionComparison : public IFunction
bool right_is_fixed_string = false;
const DataTypeTuple * right_tuple = nullptr;

false
|| (right_is_date = checkAndGetDataType<DataTypeDate>(arguments[1].get()) || checkAndGetDataType<DataTypeMyDate>(arguments[1].get()))
right_is_date = checkAndGetDataType<DataTypeDate>(arguments[1].get()) || checkAndGetDataType<DataTypeMyDate>(arguments[1].get())
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
right_is_date = checkAndGetDataType<DataTypeDate>(arguments[1].get()) || checkAndGetDataType<DataTypeMyDate>(arguments[1].get())
(right_is_date = checkAndGetDataType<DataTypeDate>(arguments[1].get()) || checkAndGetDataType<DataTypeMyDate>(arguments[1].get()))

I think we need parentheses here?

@@ -1546,8 +1544,7 @@ class FunctionComparison : public IFunction
bool left_is_fixed_string = false;
const DataTypeTuple * left_tuple = nullptr;

false
|| (left_is_date = checkAndGetDataType<DataTypeDate>(arguments[0].get()) || checkAndGetDataType<DataTypeMyDate>(arguments[0].get()))
left_is_date = checkAndGetDataType<DataTypeDate>(arguments[0].get()) || checkAndGetDataType<DataTypeMyDate>(arguments[0].get())
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
left_is_date = checkAndGetDataType<DataTypeDate>(arguments[0].get()) || checkAndGetDataType<DataTypeMyDate>(arguments[0].get())
(left_is_date = checkAndGetDataType<DataTypeDate>(arguments[0].get()) || checkAndGetDataType<DataTypeMyDate>(arguments[0].get()))

I think we need parentheses here?

dbms/src/Functions/FunctionsComparison.h Outdated Show resolved Hide resolved
@ywqzzy ywqzzy requested a review from JaySon-Huang January 13, 2022 02:34
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Jan 13, 2022

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Jan 13, 2022

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

lines: 43.9% (49989 out of 113973)
branches: 6.5% (81346 out of 1257002)

@JaySon-Huang
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@JaySon-Huang: 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: 2ec0991

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 17, 2022
@SeaRise
Copy link
Contributor

SeaRise commented Jan 17, 2022

/merge

@ti-chi-bot
Copy link
Member

@SeaRise: 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.

@SeaRise
Copy link
Contributor

SeaRise commented Jan 17, 2022

/build

@sre-bot
Copy link
Collaborator

sre-bot commented Jan 17, 2022

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

lines: 44.7% (51502 out of 115232)
branches: 7.0% (89805 out of 1275534)

@ti-chi-bot ti-chi-bot merged commit 2a18ed1 into pingcap:master Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ 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.

6 participants