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: make sysdate unfoldable #7838

Merged
merged 2 commits into from
Oct 8, 2018

Conversation

zz-jason
Copy link
Member

@zz-jason zz-jason commented Oct 8, 2018

What problem does this PR solve?

fix #4245

What is changed and how it works?

add sysdate to the unfoldable function list.

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

@zz-jason
Copy link
Member Author

zz-jason commented Oct 8, 2018

@XuHuaiyu @winoros @lamxTyler PTAL

@zz-jason zz-jason changed the title expression: make sysdate unfoldaable expression: make sysdate unfoldable Oct 8, 2018
Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

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

lgtm


func (s *testEvaluatorSuite) TestUnfoldableFuncs(c *C) {
defer testleak.AfterTest(c)()
_, ok := unFoldableFunctions[ast.Sysdate]
Copy link
Contributor

@alivxxx alivxxx Oct 8, 2018

Choose a reason for hiding this comment

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

When the issue was fixed in the first time, we also added a unit test but it did not prevent from change. Maybe it is better to add explain test or add some comments so that we know why it is unfoldable.

Copy link
Member Author

Choose a reason for hiding this comment

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

A explain test is added, PTAL.

@eurekaka eurekaka added the status/LGT2 Indicates that a PR has LGTM 2. label Oct 8, 2018
Copy link
Contributor

@alivxxx alivxxx left a comment

Choose a reason for hiding this comment

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

LGTM

@alivxxx
Copy link
Contributor

alivxxx commented Oct 8, 2018

/run-all-tests

@zz-jason zz-jason merged commit f33e04f into pingcap:master Oct 8, 2018
@zz-jason zz-jason deleted the dev/fix-sysdate branch October 8, 2018 08:47
zz-jason added a commit to zz-jason/tidb that referenced this pull request Oct 15, 2018
zz-jason added a commit to zz-jason/tidb that referenced this pull request Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[compatibility] SYSDATE() is different from mysql
4 participants