-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Support Long/Float dimensions with generic dimension handling interface #2621
Conversation
efe0a4f
to
f9b4da5
Compare
@@ -0,0 +1,382 @@ | |||
package io.druid.benchmark; |
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.
header
f9b4da5
to
938753f
Compare
public int size() | ||
{ | ||
// only single-value numerics are supported | ||
return 1; |
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.
where does the code check for this constraint?
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.
@fjy Added a size() > 1 check to LongDimensionIndexer and FloatDimensionIndexer, they'll throw an exception now if a multi-value row is passed to them
theEvent.put(dim, dimVals); | ||
Object dimVals; | ||
ValueType type = capabilities == null ? ValueType.STRING : capabilities.getType(); | ||
//switch(capabilities.getType()) { |
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.
remove
56da4c9
to
9f0c08f
Compare
@fjy added headers and removed dead code |
@jon-wei merge conflicts |
db4a3c9
to
49530dd
Compare
Rebased |
49530dd
to
524609b
Compare
524609b
to
4797875
Compare
I will try to reduce the size of this PR by splitting out the generic dimension interface changes, with support for only String dimensions. Long/Float support will then be a separate follow-on PR that uses the generic dimension interface. |
Closing this PR, I've moved the new dimension interface into a separate PR: |
This PR adds support for Long and Float numeric dimensions using a new dimension handling interface.
It depends on the following two PRs:
druid-io/druid-api#75
#2607
Implementation notes:
Unit test notes:
Example benchmark run showing difference between using Comparable (loadQIndexWrap) and IndexedInts (loadQIndex)