viirya commented on code in PR #2006: URL: https://github.com/apache/arrow-rs/pull/2006#discussion_r914216492
########## arrow/src/array/equal_json.rs: ########## @@ -359,19 +361,16 @@ impl PartialEq<FixedSizeBinaryArray> for Value { } } -impl JsonEqual for DecimalArray { +impl<T: BasicDecimal + 'static, const VALUE_LENGTH: i32> JsonEqual + for GenericDecimalArray<T, VALUE_LENGTH> +{ fn equals_json(&self, json: &[&Value]) -> bool { if self.len() != json.len() { return false; } (0..self.len()).all(|i| match json[i] { - JString(s) => { - self.is_valid(i) - && (s - .parse::<i128>() - .map_or_else(|_| false, |v| v == self.value(i).as_i128())) - } + JString(s) => self.is_valid(i) && (s == &self.value(i).to_string()), Review Comment: This is one issue on generic approach. We cannot keep original `JsonEqual` behavior for DecimalArray. This causes some test failures. -- 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