beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Xu (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (BEAM-2151) Type mapping inconsistent in BeamSqlRow & BeamSqlRowCoder
Date Sun, 07 May 2017 03:36:04 GMT

     [ https://issues.apache.org/jira/browse/BEAM-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James Xu resolved BEAM-2151.
----------------------------
       Resolution: Fixed
    Fix Version/s: Not applicable

> Type mapping inconsistent in BeamSqlRow & BeamSqlRowCoder
> ---------------------------------------------------------
>
>                 Key: BEAM-2151
>                 URL: https://issues.apache.org/jira/browse/BEAM-2151
>             Project: Beam
>          Issue Type: Bug
>          Components: dsl-sql
>            Reporter: James Xu
>            Assignee: James Xu
>            Priority: Blocker
>             Fix For: Not applicable
>
>
> In BeamSqlRow, sql FLOAT is mapping to java Float:
> {code:java}
>     case FLOAT:
>       if (!(fieldValue instanceof Float)) {
>         throw new InvalidFieldException(
>             String.format("[%s] doesn't match type [%s]", fieldValue, fieldType));
>       }
>       break;
> {code}
> but in BeamSqlRowCoder, sql FLOAT is treated as java Double:
> {code:java}
>       case DOUBLE:
>       case FLOAT:
>         doubleCoder.encode(value.getDouble(idx), outStream, nested);
>         break;
> {code}
> Let's mapping sql FLOAT consistently to java Float?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message