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

paser, executor: add date literal(#3909) #4046

Merged
merged 23 commits into from Aug 27, 2017

Conversation

Projects
None yet
6 participants
@dreamquster
Contributor

dreamquster commented Aug 5, 2017

Fixed the issue #3909

dreamquster and others added some commits Jun 18, 2017

tablecodec,mysql: mysql TypeDuration Fsp
Fixed RoundError#3471
Bug Cause:
1. when deserialize mysqlDuration, the Fsp is setted with 0 instead of the Fsp from column information.
2. the default decimal for column with TypeDuration is 0.
executor_test: add test cases
add #3471 test cases in executor_test.go
executor_test:
move test case to TestBuiltin
executor,parser: support date keyword
convert 'date stringLit' to date value
executor: data literal
add test data
Show outdated Hide outdated parser/parser.y
@XuHuaiyu

Add test in plan/ typeinfer_test.go.

Show outdated Hide outdated parser/parser.y
Show outdated Hide outdated parser/parser.y

@XuHuaiyu XuHuaiyu changed the title from paser, executor_test: add date literal, to paser, executor: add date literal(#3909) Aug 8, 2017

@XuHuaiyu

This comment has been minimized.

Show comment
Hide comment
@XuHuaiyu

XuHuaiyu Aug 10, 2017

Contributor

@dreamquster
hi, any update?

Contributor

XuHuaiyu commented Aug 10, 2017

@dreamquster
hi, any update?

dreamquster added some commits Aug 14, 2017

executor, expression: date literal
Move TestDateBuiltin to expression module.
parser: add date_literal
resolve the shift/reduce conflict between UnReservedKeyword: "DATE". and FunctionCallConflict: "DATE" . "string literal"
parser: add date_literal
retore 'date' as unreserved keyword.
@dreamquster

This comment has been minimized.

Show comment
Hide comment
@dreamquster

dreamquster Aug 21, 2017

Contributor

@XuHuaiyu , TestCases is moved to integrate_test.go. The 'data' function will check the valid of input stringLit and convert it to date type.

Contributor

dreamquster commented Aug 21, 2017

@XuHuaiyu , TestCases is moved to integrate_test.go. The 'data' function will check the valid of input stringLit and convert it to date type.

@tiancaiamao

This comment has been minimized.

Show comment
Hide comment
@tiancaiamao

tiancaiamao Aug 21, 2017

Contributor

LGTM

Contributor

tiancaiamao commented Aug 21, 2017

LGTM

@hanfei1991

This comment has been minimized.

Show comment
Hide comment
@hanfei1991
Member

hanfei1991 commented Aug 22, 2017

@XuHuaiyu PTAL

Show outdated Hide outdated expression/integration_test.go
@@ -527,6 +527,8 @@ func (s *testParserSuite) TestExpression(c *C) {
{"select n'string'", true},
// for comparison
{"select 1 <=> 0, 1 <=> null, 1 = null", true},
// for date literal
{"select date'1989-09-10'", true},

This comment has been minimized.

@zz-jason

zz-jason Aug 22, 2017

Member

add test for invalid date literals

@zz-jason

zz-jason Aug 22, 2017

Member

add test for invalid date literals

dreamquster and others added some commits Aug 25, 2017

expression, parser: add date_literal
resolve the conflict
@shenli

This comment has been minimized.

Show comment
Hide comment
@shenli

shenli Aug 27, 2017

Member

@dreamquster Thanks!
LGTM

Member

shenli commented Aug 27, 2017

@dreamquster Thanks!
LGTM

@shenli

shenli approved these changes Aug 27, 2017

@shenli shenli merged commit ff8072e into pingcap:master Aug 27, 2017

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

dbjoa added a commit to cloud-pi/tidb that referenced this pull request Aug 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment