alamb commented on a change in pull request #414:
URL: https://github.com/apache/arrow-rs/pull/414#discussion_r650956897
##########
File path: arrow/src/array/array_binary.rs
##########
@@ -613,6 +613,30 @@ impl Array for FixedSizeBinaryArray {
}
/// A type of `DecimalArray` whose elements are binaries.
+///
+/// # Examples
+///
+/// ```
+/// use arrow::array::{Array, DecimalArray, DecimalBuilder};
+/// use arrow::datatypes::DataType;
+/// let mut builder = DecimalBuilder::new(30, 23, 6);
+///
+/// builder.append_value(8_887_000_000).unwrap();
+/// builder.append_null().unwrap();
+/// builder.append_value(-8_887_000_000).unwrap();
+/// let decimal_array: DecimalArray = builder.finish();
+///
+/// assert_eq!(&DataType::Decimal(23, 6), decimal_array.data_type());
+/// assert_eq!(8_887_000_000, decimal_array.value(0));
+/// assert_eq!("8887.000000", decimal_array.value_as_string(0));
Review comment:
❤️
--
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]