bkietz commented on a change in pull request #10386:
URL: https://github.com/apache/arrow/pull/10386#discussion_r638851046



##########
File path: cpp/src/arrow/testing/gtest_util.cc
##########
@@ -396,6 +438,13 @@ std::shared_ptr<RecordBatch> RecordBatchFromJSON(const 
std::shared_ptr<Schema>&
   return *RecordBatch::FromStructArray(struct_array);
 }
 
+std::shared_ptr<Scalar> ScalarFromJSON(const std::shared_ptr<DataType>& type,
+                                       util::string_view json) {
+  std::shared_ptr<Scalar> out;
+  ABORT_NOT_OK(ipc::internal::json::ScalarFromJSON(type, json, &out));

Review comment:
       This approach might be worthwhile for consistency's sake, but we could 
also use `Scalar::CastTo`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to