[ 
https://issues.apache.org/jira/browse/ARROW-12859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17350468#comment-17350468
 ] 

David Li commented on ARROW-12859:
----------------------------------

Ah, I had only been thinking about primitives…we could either make it 
{{PrimitiveDatumFromJSON}} or just cancel this (tests could also just define an 
{{AssertFoo(Datum ...)}} and then use {{ScalarFromJSON}} or {{ArrayFromJSON}} 
as appropriate - would be more verbose but would at least avoid having to 
define lots of overloads). Or we could define very simple wrappers 
({{DatumFromJSON(int64(), Scalar("[1]")}}) which could become C++14 
user-defined literals ({{DatumFromJSON(int64(), "[1]"_scalar}}).

> [C++] Add DatumFromJSON for easier testing
> ------------------------------------------
>
>                 Key: ARROW-12859
>                 URL: https://issues.apache.org/jira/browse/ARROW-12859
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: David Li
>            Assignee: David Li
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> For kernels that accept/return permutations of array/scalar arguments, having 
> a single DatumFromJSON would make things much easier to test (as then we can 
> have helper test methods that just take {{const std::string&}} instead of 
> having to make many overloads for the various input/output permutations).



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

Reply via email to