You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Gleb Kanterov (Jira)" <ji...@apache.org> on 2019/11/28 09:44:00 UTC
[jira] [Resolved] (BEAM-5918) Add Cast transform for Rows
[ https://issues.apache.org/jira/browse/BEAM-5918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gleb Kanterov resolved BEAM-5918.
---------------------------------
Fix Version/s: Not applicable
Resolution: Fixed
> 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: Gleb Kanterov
> Priority: Major
> Fix For: Not applicable
>
> Time Spent: 9h 40m
> Remaining Estimate: 0h
>
> 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
(v8.3.4#803005)