liukun4515 commented on code in PR #2041: URL: https://github.com/apache/arrow-rs/pull/2041#discussion_r917773772
########## arrow/src/array/array_decimal.rs: ########## @@ -148,6 +148,32 @@ pub trait BasicDecimalArray<T: BasicDecimal, U: From<ArrayData>>: self.value(row).to_string() } + /// Build a decimal array from [`FixedSizeBinaryArray`]. + /// + /// This function does not check the validation of each + /// value for performance reason. + fn from_fixed_size_binary_array( + v: FixedSizeBinaryArray, + precision: usize, + scale: usize, + ) -> U { + assert!( + v.value_length() == Self::VALUE_LENGTH, + "Value length of the array ({}) must equal to the byte width of the decimal ({})", Review Comment: But from this message, this function is just used to convert to the decimal array. @HaoYang670 -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org