Function mz_sql::plan::typeconv::guess_best_common_type
source · pub fn guess_best_common_type(
ecx: &ExprContext<'_>,
types: &[Option<ScalarType>]
) -> Result<ScalarType, PlanError>
Expand description
Guesses the most-common type among a set of ScalarType
s that all members
can be cast to. Returns None
if a common type cannot be deduced.
Note that this function implements the type-determination components of
Postgres’ “UNION
, CASE
, and Related Constructs” type
conversion.