Skip to content
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

[Java] Implement a common interface for int vectors #22153

Closed
asfimport opened this issue Jun 25, 2019 · 1 comment
Closed

[Java] Implement a common interface for int vectors #22153

asfimport opened this issue Jun 25, 2019 · 1 comment

Comments

@asfimport
Copy link

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.

Reporter: Ji Liu / @tianchen92
Assignee: Ji Liu / @tianchen92

PRs and other links:

Note: This issue was originally created as ARROW-5726. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Micah Kornfield / @emkornfield:
Issue resolved by pull request 4698
#4698

@asfimport asfimport added this to the 0.14.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants