Skip to content

types: fix incorrect time fraction parsing method#9933

Merged
zz-jason merged 9 commits intopingcap:masterfrom
WangXiangUSTC:xiang/cast_date
Apr 1, 2019
Merged

types: fix incorrect time fraction parsing method#9933
zz-jason merged 9 commits intopingcap:masterfrom
WangXiangUSTC:xiang/cast_date

Conversation

@WangXiangUSTC
Copy link
Copy Markdown
Contributor

What problem does this PR solve?

fix issue #9734
tidb don't support date time format like "2019.01.01"

What is changed and how it works?

some minor update, and add unit test

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

@WangXiangUSTC
Copy link
Copy Markdown
Contributor Author

/run-all-tests

@qw4990
Copy link
Copy Markdown
Contributor

qw4990 commented Apr 1, 2019

/rebuild

@qw4990
Copy link
Copy Markdown
Contributor

qw4990 commented Apr 1, 2019

/run-all-tests

Comment thread types/time.go Outdated
Comment thread types/time.go Outdated
Comment thread types/time.go Outdated
@winkyao
Copy link
Copy Markdown
Contributor

winkyao commented Apr 1, 2019

Any reference mysql doc?

Comment thread types/time.go Outdated
Copy link
Copy Markdown
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

Copy link
Copy Markdown
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason
Copy link
Copy Markdown
Member

zz-jason commented Apr 1, 2019

/run-all-tests

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. component/expression labels Apr 1, 2019
@zz-jason zz-jason changed the title datetime: support parse string like "2019.01.01" to compatible with mysql types: fix incorrect time fraction parsing method Apr 1, 2019
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2019

Codecov Report

Merging #9933 into master will increase coverage by 0.3224%.
The diff coverage is 100%.

@@               Coverage Diff                @@
##             master      #9933        +/-   ##
================================================
+ Coverage   77.4719%   77.7943%   +0.3224%     
================================================
  Files           403        403                
  Lines         81809      82479       +670     
================================================
+ Hits          63379      64164       +785     
+ Misses        13711      13631        -80     
+ Partials       4719       4684        -35

@WangXiangUSTC
Copy link
Copy Markdown
Contributor Author

@winkyao I search the mysql's document, can't find the detail about the format of date time string. I just execute in mysql to check.

@zz-jason zz-jason merged commit bf9570a into pingcap:master Apr 1, 2019
@zz-jason
Copy link
Copy Markdown
Member

zz-jason commented Apr 1, 2019

@WangXiangUSTC Please cherry pick this PR to release 2.1

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants