You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Micah Kornfield (JIRA)" <ji...@apache.org> on 2019/07/01 03:12:00 UTC
[jira] [Resolved] (ARROW-5726) [Java] Implement a common interface
for int vectors
[ https://issues.apache.org/jira/browse/ARROW-5726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Micah Kornfield resolved ARROW-5726.
------------------------------------
Resolution: Fixed
Fix Version/s: 0.14.0
Issue resolved by pull request 4698
[https://github.com/apache/arrow/pull/4698]
> [Java] Implement a common interface for int vectors
> ---------------------------------------------------
>
> Key: ARROW-5726
> URL: https://issues.apache.org/jira/browse/ARROW-5726
> Project: Apache Arrow
> Issue Type: New Feature
> Components: Java
> Reporter: Ji Liu
> Assignee: Ji Liu
> Priority: Minor
> Labels: pull-request-available
> Fix For: 0.14.0
>
> Time Spent: 3h 20m
> Remaining Estimate: 0h
>
> Now in _DictionaryEncoder#encode_ it use reflection to pull out the set method and then set values.
> Set values by reflection is not efficient and code structure is not elegant such as
> _Method setter = null;_
> _for (Class<?> c : Arrays.asList(int.class, long.class)) {_
> _try {_
> _setter = indices.getClass().getMethod("setSafe", int.class, c);_
> _break;_
> _} catch (NoSuchMethodException e) {_
> _// ignore_
> _}_
> _}_
> Implement a common interface for int vectors to directly get set method and set values seems a good choice.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)