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

diff: fix num is nil #250

Merged
merged 3 commits into from
Jun 17, 2019
Merged

Conversation

WangXiangUSTC
Copy link
Contributor

What problem does this PR solve?

fix issue https://internal.pingcap.net/jira/browse/TOOL-1289

What is changed and how it works?

judge whether data is nil at the first when compare data

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

@WangXiangUSTC
Copy link
Contributor Author

/run-integration-tests

pkg/diff/merge.go Outdated Show resolved Hide resolved
pkg/diff/merge.go Outdated Show resolved Hide resolved
Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

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

LGTM

names := []string{"d", "b", "c", "b", "a"}
ages := []int{1, 2, 3, 4, 5}
ids := []string{"3", "2", "2", "4", "1", "NULL"}
names := []string{"d", "NULL", "c", "b", "a", "e"}
Copy link
Contributor

Choose a reason for hiding this comment

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

we can add more test cases to increase code path coverage later (easy to find out which code is not covered after added some coverage integration tool).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

Copy link
Contributor

@amyangfei amyangfei left a comment

Choose a reason for hiding this comment

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

LGTM

@WangXiangUSTC WangXiangUSTC merged commit e22191f into pingcap:master Jun 17, 2019
@WangXiangUSTC WangXiangUSTC deleted the xiang/diff_fix branch June 17, 2019 09:53
ericsyh pushed a commit that referenced this pull request Jun 24, 2019
* diff: add connection manage (#237)

* column-mapping: set schemaID/tableID to 0 if numeric suffix is missing (#236)

* column-mapping: set schemaID/tableID to 0 if numeric suffix is missing

* column-mapping: demand an explicit separator

* pkg/column-mapping: addressed comments

* column-mapping: addressed comments

* diff: some minor fix (#242)

* remove row_id (#240)

* diff: update column's length for checkpoint table (#245)

* diff: add integration test (#239)

* diff: fix num is nil (#250)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants