You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/10/18 12:22:00 UTC

[jira] [Updated] (ARROW-6930) [Java] Create static factory methods for common array types of testing.

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

ASF GitHub Bot updated ARROW-6930:
----------------------------------
    Labels: pull-request-available  (was: )

> [Java] Create static factory methods for common array types of testing.
> -----------------------------------------------------------------------
>
>                 Key: ARROW-6930
>                 URL: https://issues.apache.org/jira/browse/ARROW-6930
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Micah Kornfield
>            Assignee: Ji Liu
>            Priority: Minor
>              Labels: pull-request-available
>
> 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)