Gleb Kanterov created BEAM-5918:
-----------------------------------
Summary: Add Cast transform for Rows
Key: BEAM-5918
URL: https://issues.apache.org/jira/browse/BEAM-5918
Project: Beam
Issue Type: Improvement
Components: sdk-java-core
Reporter: Gleb Kanterov
Assignee: Kenneth Knowles
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))
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)