kiszk commented on a change in pull request #7555:
URL: https://github.com/apache/arrow/pull/7555#discussion_r450040328
##########
File path: cpp/src/arrow/ipc/test_common.cc
##########
@@ -79,6 +79,39 @@ Status MakeRandomInt32Array(int64_t length, bool
include_nulls, MemoryPool* pool
return Status::OK();
}
+template <typename ArrayType>
+static Status MakeRandomArray(int64_t length, bool include_nulls, MemoryPool*
pool,
+ std::shared_ptr<Array>* out, uint32_t seed) {
+ random::RandomArrayGenerator rand(seed);
+ const double null_probability = include_nulls ? 0.5 : 0.0;
+
+ *out = rand.Numeric<ArrayType>(length, 0, 1000, null_probability);
+
+ return Status::OK();
+}
+
+template <>
Review comment:
specialize for 8-bit data. This is because range(0, 1000) is too big for
8-bit data. Win64 causes hang-up without this specialization.
----------------------------------------------------------------
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:
[email protected]