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

[Java] Create utility class for populating vector values used for test purpose only

    XMLWordPrintableJSON

    Details

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

      Description

      There is a lot of verbosity in the construction of Arrays for testing purposes (multiple lines of setSafe(...) or set(...).
      We should start adding a utility class to make test setup clearer and more concise, note this class should be located in arrow-vector test package and could be used in other module’s testing by adding dependency:

      <dependency>
      <groupId>org.apache.arrow</groupId>
      <artifactId>arrow-vector</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
      <type>test-jar</type>
      <scope>test</scope>
      </dependency>

      Usage would be something like:

      try (IntVector vector = new IntVector(“vector”, allocator))

      Unknown macro: { ValueVectorPopulator.setVector(vector, 1, 2, null, 4, 5); output = doSomethingWith(input); assertThat(output).isEqualTo(expected); }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tianchen92 Ji Liu
                Reporter:
                emkornfield@gmail.com Micah Kornfield
              • 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 - 11.5h
                  11.5h