[teiid-issues] [JBoss JIRA] (TEIID-3843) SAP HANA wrong results from MOD with float argument
RH Bugzilla Integration (JIRA)
issues at jboss.org
Thu Feb 1 08:46:00 EST 2018
[ https://issues.jboss.org/browse/TEIID-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13527278#comment-13527278 ]
RH Bugzilla Integration commented on TEIID-3843:
------------------------------------------------
Jan Stastny <jstastny at redhat.com> changed the Status of [bug 1284878|https://bugzilla.redhat.com/show_bug.cgi?id=1284878] from ON_QA to CLOSED
> SAP HANA wrong results from MOD with float argument
> ---------------------------------------------------
>
> Key: TEIID-3843
> URL: https://issues.jboss.org/browse/TEIID-3843
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.7.2.6_2
> Reporter: Jan Stastny
> Assignee: Ted Jones
>
> SAP HANA doesn't handle correctly MOD function with float arguments. The problem occurs when the float value is less than zero.
> According to SAP HANA documentation, its MOD implementation follows the symmetric handling of MOD on less than zero values. In such case, the resulting value should be computed as:
> a is negative whole number
> n is positive whole number
> mod(a,n)
> # get -1*a
> # compute mod(-1*a,n)
> # multiply the result by -1
> # result is -1*mod(-1*a,n)
> SAP HANA follows this rule for other numeric types than float. For example for Long value -24 MOD(-24,11)=-2 , which is correct according to the MOD definition.
> But when you call MOD(-24.0,11) you get 2.0
> In current state, the only thing Teiid could do is to prevent pushing MOD with float arguments. It helps to cast explicitly the column to double.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the teiid-issues
mailing list