Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-5726

[Java] Implement a common interface for int vectors

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.14.0
    • Component/s: Java

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tianchen92 Ji Liu
                Reporter:
                tianchen92 Ji Liu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 50m
                  3h 50m