You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "James Xu (JIRA)" <ji...@apache.org> on 2017/05/07 03:36:04 UTC

[jira] [Resolved] (BEAM-2151) Type mapping inconsistent in BeamSqlRow & BeamSqlRowCoder

     [ 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)