Skip to content

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

Closed

Description

@asfimport

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.

Activity

  1. asfimport commented on Jul 1, 2019

    @asfimport
    Author

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

  2. added this to the 0.14.0 milestone on Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions