Skip to content

expression: make sysdate unfoldable#7838

Merged
zz-jason merged 2 commits intopingcap:masterfrom
zz-jason:dev/fix-sysdate
Oct 8, 2018
Merged

expression: make sysdate unfoldable#7838
zz-jason merged 2 commits intopingcap:masterfrom
zz-jason:dev/fix-sysdate

Conversation

@zz-jason
Copy link
Copy Markdown
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
Copy Markdown
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
Comment thread expression/function_traits.go
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

alivxxx commented Oct 8, 2018

/run-all-tests

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