Function sql::plan::query::coerce_homogeneous_exprs [−][src]
pub fn coerce_homogeneous_exprs(
name: &str,
ecx: &ExprContext<'_>,
exprs: Vec<CoercibleScalarExpr>,
type_hint: Option<&ScalarType>
) -> Result<Vec<HirScalarExpr>, PlanError>
Expand description
Coerces a list of expressions such that all input expressions will be cast to the same type. If successful, returns a new list of expressions in the same order as the input, where each expression has the appropriate casts to make them all of a uniform type.
Note that this is our implementation of Postgres’ type conversion for
“UNION
, CASE
, and Related Constructs”, though it
isn’t yet used in all of those cases.