-
Notifications
You must be signed in to change notification settings - Fork 266
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
MySQL Join implementation #921
Conversation
@@ -148,7 +140,7 @@ private static int mapActions(MySQLGlobalState globalState, Action a) { | |||
|
|||
@Override | |||
public void generateDatabase(MySQLGlobalState globalState) throws Exception { | |||
while (globalState.getSchema().getDatabaseTables().size() < Randomly.smallNumber() + 1) { | |||
while (globalState.getSchema().getDatabaseTables().size() < Randomly.getNotCachedInteger(1, 6)) { |
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.
6 tables seem like a lot here and might have a detrimental effect on performance. Could we perhaps set the limit depending on the test oracle here?
@@ -148,7 +140,7 @@ private static int mapActions(MySQLGlobalState globalState, Action a) { | |||
|
|||
@Override | |||
public void generateDatabase(MySQLGlobalState globalState) throws Exception { | |||
while (globalState.getSchema().getDatabaseTables().size() < Randomly.smallNumber() + 1) { | |||
while (globalState.getSchema().getDatabaseTables().size() < Randomly.getNotCachedInteger(1, 2)) { |
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 think we could just leave Randomly.smallNumber() + 1
, which might sometimes generate more tables than 2?
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.
No. Small number returns (-1, 1) with a Gaussian distribution, which means in most situations, there is only one table.
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.
Thanks for the clarification!
Part of #918