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



##########
File path: cpp/src/arrow/testing/random.h
##########
@@ -250,6 +250,21 @@ class ARROW_EXPORT RandomArrayGenerator {
                                            int32_t min_length, int32_t 
max_length,
                                            double null_probability = 0);
 
+  /// \brief Randomly generate an Array of the specified type, size, and 
null_probability.
+  ///
+  /// Generation parameters other than size and null_probability are 
determined based on
+  /// the type of Array to be generated.
+  /// If boolean the probabilities of true,false values are 0.25,0.75 
respectively.
+  /// If numeric min,max will be the least and greatest representable values.
+  /// If string min_length,max_length will be 0,sqrt(size) respectively.
+  ///
+  /// \param[in] type the type of Array to generate
+  /// \param[in] size the size of the Array to generate
+  /// \param[in] null_probability the probability of a slot being null
+  /// \return a generated Array
+  std::shared_ptr<Array> ArrayOf(std::shared_ptr<DataType> type, int64_t size,
+                                 double null_probability);

Review comment:
       https://issues.apache.org/jira/browse/ARROW-9149




----------------------------------------------------------------
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