Function mz_transform::typecheck::is_subtype_of
source · pub fn is_subtype_of(sub: &[ColumnType], sup: &[ColumnType]) -> bool
Expand description
Returns true when it is safe to treat a sub
row as an sup
row
In particular, the core types must be equal, and if a column in sup
is nullable, that column should also be nullable in sub
Conversely, it is okay to treat a known non-nullable column as nullable: sub
may be nullable when sup
is not