Details
-
Improvement
-
Status: Resolved
-
P2
-
Resolution: Fixed
-
None
Description
There is a need for a generic transform that given two Row schemas will convert rows between them. There must be a possibility to opt-out from certain kind of conversions, for instance, converting ints to shorts can cause overflow. Another example, a schema could have a nullable field, but never have NULL value in practice, because it was filtered out.
What is needed:
- widening values (e.g., int -> long)
- narrowwing (e.g., int -> short)
- runtime check for overflow while narrowing
- ignoring nullability (nullable=true -> nullable=false)
- weakening nullability (nullable=false -> nullable=true)
- projection (Schema(a: Int32, b: Int32) -> Schema(a: Int32))