pub fn to_string(
ecx: &ExprContext<'_>,
expr: HirScalarExpr,
) -> Result<HirScalarExpr, PlanError>Expand description
Converts an expression to SqlScalarType::String.
Most types have an explicit cast to string, but a few do not: mz_aclitem
has no text cast at all, and the reg* casts are implemented as subqueries
that plan_cast rejects in contexts that disallow subqueries (e.g. a
RETURNING clause or a to_jsonb element cast). We surface those as a
planning error rather than panicking.