datafusion_expr::binary

Function string_coercion

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

Coercion rules for string view types (Utf8/LargeUtf8/Utf8View): If at least one argument is a string view, we coerce to string view based on the observation that StringArray to StringViewArray is cheap but not vice versa.

Between Utf8 and LargeUtf8, we coerce to LargeUtf8.