Skip to content

Commit

Permalink
restore comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jan 19, 2022
1 parent cdda360 commit c065f05
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion datafusion/src/physical_plan/coercion_rule/binary_rule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,10 @@ fn numerical_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option<DataTy
return None;
};

// same type => all good
// can't compare dictionaries directly due to
// https://github.com/apache/arrow-rs/issues/1201
if lhs_type == rhs_type && !is_dictionary(lhs_type) {
// same type => all good
return Some(lhs_type.clone());
}

Expand All @@ -456,6 +458,8 @@ fn numerical_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option<DataTy

/// coercion rules for equality operations. This is a superset of all numerical coercion rules.
fn eq_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option<DataType> {
// can't compare dictionaries directly due to
// https://github.com/apache/arrow-rs/issues/1201
if lhs_type == rhs_type && !is_dictionary(lhs_type) {
// same type => equality is possible
return Some(lhs_type.clone());
Expand Down

0 comments on commit c065f05

Please sign in to comment.