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: handle builtin time getInterval from Decimal\Real (#11479) #11527

Merged
merged 4 commits into from
Aug 1, 2019

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Jul 30, 2019

cherry-pick #11479 to release-3.0

@sre-bot
Copy link
Contributor Author

sre-bot commented Jul 30, 2019

/run-all-tests

@qw4990
Copy link
Contributor

qw4990 commented Aug 1, 2019

@AndrewDi Please resolve these CI problems when it's convenient for you.
The error is expression/builtin_time_test.go:2784:149: undefined: newMyDecimal.
It seems that there is some other code needed to be picked.

@AndrewDi
Copy link
Contributor

AndrewDi commented Aug 1, 2019

@qw4990 It seem like we should pick commit ae58fd0 first...
this commit implement newMyDecimal func

func newMyDecimal(c *C, s string) *types.MyDecimal {
d := new(types.MyDecimal)
c.Assert(d.FromString([]byte(s)), IsNil)
return d
}

@zz-jason zz-jason requested review from SunRunAway and qw4990 August 1, 2019 04:59
@qw4990
Copy link
Contributor

qw4990 commented Aug 1, 2019

@qw4990 It seem like we should pick commit ae58fd0 first...
this commit implement newMyDecimal func

func newMyDecimal(c *C, s string) *types.MyDecimal {
d := new(types.MyDecimal)
c.Assert(d.FromString([]byte(s)), IsNil)
return d
}

OK, I'm trying to cherry-pick it now...

}

for _, test := range tests {
interval, isNull, err := du.getIntervalFromDecimal(s.ctx, s.datumsToConstants([]types.Datum{types.NewDatum("CURRENT DATE"), types.NewDecimalDatum(newMyDecimal(c, test.param))}), chunk.Row{}, test.unit)
Copy link
Contributor

Choose a reason for hiding this comment

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

ae58fd0 has been cherry-picked in #11560, PTAL

@qw4990
Copy link
Contributor

qw4990 commented Aug 1, 2019

/run-all-tests

@qw4990
Copy link
Contributor

qw4990 commented Aug 1, 2019

/run-unit-test

Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

LGTM

@qw4990 qw4990 added status/all tests passed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 1, 2019
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

@winoros winoros added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 1, 2019
@sre-bot
Copy link
Contributor Author

sre-bot commented Aug 1, 2019

/run-all-tests

@sre-bot sre-bot merged commit d523d65 into pingcap:release-3.0 Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression contribution This PR is from a community contributor. status/can-merge Indicates a PR has been approved by a committer. 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.

4 participants