alamb commented on code in PR #6588:
URL: https://github.com/apache/arrow-rs/pull/6588#discussion_r1808596321
##########
arrow-array/src/record_batch.rs:
##########
@@ -79,6 +79,76 @@ pub struct RecordBatch {
row_count: usize,
}
+/// Creates an array from a literal slice of values,
+/// suitable for rapid testing and development.
+///
+/// Example:
+///
+/// ```rust
+///
+/// use arrow_array::create_array;
+///
+/// let array = create_array!(Int32, [1, 2, 3, 4, 5]);
+/// ```
+#[macro_export]
+macro_rules! create_array {
Review Comment:
@ByteBaker would you be willing to extend this macro to cover the other
variants of
https://docs.rs/arrow/latest/arrow/datatypes/enum.DataType.html
Maybe we could simply start with "non nested" types (e.g. no list,
dictionary, REE, etc) ?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]