You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Hans Zeller (JIRA)" <ji...@apache.org> on 2017/05/17 16:13:04 UTC

[jira] [Resolved] (TRAFODION-2615) TMUDF returns wrong results with small numeric inputs

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

Hans Zeller resolved TRAFODION-2615.
------------------------------------
    Resolution: Fixed

Fix checked in as part of https://github.com/apache/incubator-trafodion/pull/1092.

> TMUDF returns wrong results with small numeric inputs
> -----------------------------------------------------
>
>                 Key: TRAFODION-2615
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2615
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>    Affects Versions: 2.1-incubating
>            Reporter: Hans Zeller
>            Assignee: Hans Zeller
>             Fix For: 2.2-incubating
>
>         Attachments: EchoUdf.cpp
>
>
> I got an incorrect result with this query:
> {noformat}
> >>select * from udf(echo(table(select * from (values (1), (22), (3), (4)) t(x))));
> X     
> ------
>      1
>   -234
>      3
>    772
> --- 4 row(s) selected.
> >>
> {noformat}
> Note that -234 if FF16 (and 16 is hex for 22) and that 772 is 304, so it's a junk byte followed by the true values 22 and 4 that is returned.



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