Function comparison_coercion_numeric

Source
pub fn comparison_coercion_numeric(
    lhs_type: &DataType,
    rhs_type: &DataType,
) -> Option<DataType>
Expand description

Similar to comparison_coercion but prefers numeric if compares with numeric and string

ยงNumeric comparisons

When comparing numeric values and strings, the values will be coerced to the numeric type. For example, '2' > 1 if 1 is an Int32, the arguments will be coerced to Int32.