-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Improve conversion to domain #7754
Conversation
For example when providing values to a `BIGINT`-based `ValueSet`, one should be able to pass a `List<Long>` as values.
This comment has been minimized.
This comment has been minimized.
CI #7755 |
@@ -308,56 +308,51 @@ public static Domain getDomain(Type type, DictionaryDescriptor dictionaryDescrip | |||
|
|||
int dictionarySize = dictionaryPage.get().getDictionarySize(); | |||
if (type.equals(BIGINT) && columnDescriptor.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.INT64) { | |||
List<Domain> domains = new ArrayList<>(); | |||
List<Long> values = new ArrayList<>(); |
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 this is the bottleneck then maybe long[] will be faster.
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.
ValueSet
constructor currently does accept primitive arrays.
however, i will at least preallocate the list to the required size, since it's well known.
This fixes a performance regression introduced by 82e8f93.
5938bab
to
baeef04
Compare
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.
Nice
No description provided.