Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
coerce_types in datafusion_expr::type_coercion::binary - Rust
[go: Go Back, main page]

pub fn coerce_types(
    lhs_type: &DataType,
    op: &Operator,
    rhs_type: &DataType
) -> Result<DataType>
Expand description

Coercion rules for all binary operators. Returns the output type of applying op to an argument of lhs_type and rhs_type.

Returns None if no suitable type can be found.

TODO this function is trying to serve two purposes at once; it determines the result type of the binary operation and also determines how the inputs can be coerced but this results in inconsistencies in some cases (particular around date + interval) when the input argument types do not match the output argument types

Tracking issue is https://github.com/apache/arrow-datafusion/issues/3419