-
Notifications
You must be signed in to change notification settings - Fork 191
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
Fix bugs with TPCH implementation #204
Conversation
…match the specification
…n meant that for at least some databases the correct query text is used anyways, which is why there were not errors from mismatching # and type of query parameters.
had 'ETHIOPIA' hardcoded for one of the nation keys.
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.
This is great! Can you make it so that we pass in the scale factor as an input parameter to the getStatement()
methods instead of storing the WorkloadConfiguration
in Procedure
?
protected final <T extends Procedure> T initialize(WorkloadConfiguration workConf) { | ||
this.workConf = workConf; |
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 don't think we should do this. It makes it more brittle since WorkloadConfiguration
is basically a dumping ground for everything. Let's revert this and only pass in DatabaseType
.
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.
Done.
@@ -63,12 +63,12 @@ protected PreparedStatement getStatement(Connection conn, RandomGenerator rand) | |||
String nation = TPCHUtil.choice(TPCHConstants.N_NAME, rand); | |||
|
|||
// FRACTION is chosen as 0.0001 / SF | |||
// TODO: we should technically pass dbgen's SF down here somehow | |||
double fraction = 0.0001; | |||
double fraction = 0.0001 / this.workConf.getScaleFactor(); |
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.
We should pass this in as an input parameter to getStatement()
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've refactored it to pass scale factor to getStatement
. The changes are all restricted to benchmarks/tpch
now instead of changing the generic api.
…king the whole configuration available.
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. I will merge when it passes.
This changes fixes a few bugs with the TPCH queries where it does not match the specification. Note: each fix is a separate commit so they can be reviewed independently if that is easier. (I can also split into multiple PRs if preferred, but the changes are pretty small)
Procedure
base class duringinitialize
instead of just the database type, but if there is a better way to access the scale factor I am happy to change this.