Skip to content

Commit

Permalink
Switch to Arc::clone
Browse files Browse the repository at this point in the history
  • Loading branch information
blaginin committed Nov 17, 2024
1 parent d169abc commit baf99cb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions datafusion/expr-common/src/type_coercion/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1139,12 +1139,9 @@ fn numeric_string_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option<D
}

fn coerce_list_children(lhs_field: &FieldRef, rhs_field: &FieldRef) -> Option<FieldRef> {
Some(Arc::new(
Arc::unwrap_or_clone(Arc::clone(lhs_field)).with_data_type(comparison_coercion(
lhs_field.data_type(),
rhs_field.data_type(),
)?),
))
Some(Arc::new((**lhs_field).clone().with_data_type(
comparison_coercion(lhs_field.data_type(), rhs_field.data_type())?,
)))
}

/// Coercion rules for list types.
Expand Down

0 comments on commit baf99cb

Please sign in to comment.