Skip to main content

comparison_coercion_with_session_timezone

Function comparison_coercion_with_session_timezone 

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

Returns the common type for the non-binary comparison expressions (IN, BETWEEN, CASE x WHEN, IN (<subquery>), = ANY/ALL), using the same rules as = itself so they cannot disagree with it.

session_time_zone is datafusion.execution.time_zone; see BinaryTypeCoercer::with_session_time_zone.

The session timezone is applied recursively to timestamps inside dictionary, run-end encoded, list, struct, and map types.