alamb commented on code in PR #2721:
URL: https://github.com/apache/arrow-datafusion/pull/2721#discussion_r903011945
##########
datafusion/core/src/physical_plan/hash_join.rs:
##########
@@ -1054,6 +1110,116 @@ fn equal_rows(
DataType::LargeUtf8 => {
equal_rows_elem!(LargeStringArray, l, r, left, right,
null_equals_null)
}
+ DataType::Decimal(_, lscale) => match r.data_type() {
+ DataType::Decimal(_, rscale) => {
+ if lscale == rscale {
+ equal_rows_elem!(
+ DecimalArray,
+ l,
+ r,
+ left,
+ right,
+ null_equals_null
+ )
+ } else {
Review Comment:
> If the coerced type has been calculated, we don't need to check the data
type between left and right.
I think it would be wise to check the data type between left and right (and
throw an error if it does not match) even if the coercion is supposed to do
that work. My rationale for the test is so that if anything ever goes wrong
with the coercion we would get an error rather than incorrect results
--
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]