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

simplify the if/else logic #191

Merged
merged 2 commits into from
Jan 31, 2019
Merged

simplify the if/else logic #191

merged 2 commits into from
Jan 31, 2019

Conversation

lewgun
Copy link
Contributor

@lewgun lewgun commented Jan 29, 2019

What problem does this PR solve?

simplify the if/else logic

What is changed and how it works?

refactor to simplify the if/else logic

Check List

Tests

  • Unit test

Code changes

  • N/A

Side effects

  • N/A

Related changes

  • N/A

Copy link
Contributor

@WangXiangUSTC WangXiangUSTC left a comment

Choose a reason for hiding this comment

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

thanks! rest LGTM

@@ -243,25 +243,26 @@ func (s *randomSpliter) splitRange(db *sql.DB, chunk *chunkRange, count int, sch
symbolMax = chunk.bounds[colNum-1].upperSymbol
} else {
// choose the next column to split data
Copy link
Contributor

Choose a reason for hiding this comment

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

please move this comment to L250

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done PTAL @WangXiangUSTC

@WangXiangUSTC
Copy link
Contributor

LGTM

@WangXiangUSTC WangXiangUSTC merged commit d3b5f21 into pingcap:master Jan 31, 2019
WangXiangUSTC pushed a commit to WangXiangUSTC/tidb-tools that referenced this pull request Feb 11, 2019
WangXiangUSTC added a commit that referenced this pull request Feb 13, 2019
* sync_diff_inspector: fix a misleading regex example in config.toml (#141)

* update pkg about database (#142)

* diff: add database name and table name router (#172)

* simplify the if/else logic (#179)

refactor to simplify the if/else logic

* diff: can use multiple columns to split chunks (#130)

* simplify the if/else logic (#191)
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.

2 participants