-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
cmd/importer: support probability in building incremental column #10454
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10454 +/- ##
================================================
- Coverage 77.3086% 77.3043% -0.0044%
================================================
Files 412 412
Lines 86575 86629 +54
================================================
+ Hits 66930 66968 +38
- Misses 14503 14512 +9
- Partials 5142 5149 +7 |
d.minIntValue = min | ||
d.maxIntValue = max | ||
d.useRange = true | ||
if d.step < 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we specially handle 0 step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If step is 0, we can use range
or set
rule, instead of incremental
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lamxTyler How do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 step also makes senses, for example, we only want constant data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but if we want constant data, we don't need to use incremental
, a better way is using set
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to do this optimization in the future, for now, let's make it work.
please IGNORE this comment |
/run-all-tests tidb-test=pr/814 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What problem does this PR solve?
Generate column values in incremental order mostly, but with some exceptions controlled by input parameter.
What is changed and how it works?
Support new rule
probability=xxx
which should be used together withincremental
, to control the exceptions in overall incremental order.Check List
Tests
Code changes
N/A
Side effects
N/A
Related changes
N/A