You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Ji Liu (Jira)" <ji...@apache.org> on 2019/11/14 02:04:01 UTC

[jira] [Updated] (ARROW-6930) [Java] Create utility class for populating vector values used for test purpose only

     [ https://issues.apache.org/jira/browse/ARROW-6930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ji Liu updated ARROW-6930:
--------------------------
    Issue Type: New Feature  (was: Improvement)

> [Java] Create utility class for populating vector values used for test purpose only
> -----------------------------------------------------------------------------------
>
>                 Key: ARROW-6930
>                 URL: https://issues.apache.org/jira/browse/ARROW-6930
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: Java
>            Reporter: Micah Kornfield
>            Assignee: Ji Liu
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 10h 20m
>  Remaining Estimate: 0h
>
> There is a lot of verbosity in the construction of Arrays for testing purposes (multiple lines of setSafe(...) or set(...).  We should start adding some static factory methods to make test setup clearer  and more concise.  A strawman proposal for BigIntVector might look like:
>  
> static BigIntVector create(String name, BufferAllocator allocator, Long... values).
>  
> Usage would be something like:
>  
> try (BigIntVector input = BigIntVectorCreate("sample_data", allocator, 1235L, null, 456L),
>       BigIntVector expected = BigIntVectorCreate("sample_data", allocator, 1L, null, 0L),) {
>    output = doSomethingWith(input);
>    assertThat(output).isEqualTo(expected);
> }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)