[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17459502#comment-17459502
 ] 

ASF subversion and git services commented on ASTERIXDB-2999:
------------------------------------------------------------

Commit 3030acb653b41a52c97a842043e36739f1677554 in asterixdb's branch 
refs/heads/master from Dmitry Lychagin
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=3030acb ]

[ASTERIXDB-2999][RT] Round towards zero when convering floating-point to integer

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Remove use of Math.floor() during floating-point to integer conversion.
  The conversion code now rounds both positivie and negative values towards zero
- Update index selection code to account for this change
- Add SqlppNumericIndexRQGTest to randomly test different combinations
  of indexes on numeric fields

Change-Id: I1c92d6235e16e6c5d9dadd7a09cd9703781eadb6
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/14525
Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Reviewed-by: Ali Alsuliman <ali.al.solai...@gmail.com>


> Fix integer constructors handling of negative double/float numbers
> ------------------------------------------------------------------
>
>                 Key: ASTERIXDB-2999
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2999
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: RT - Runtime
>            Reporter: Dmitry Lychagin
>            Assignee: Dmitry Lychagin
>            Priority: Major
>
> Currently bigint() and other integer constructors round down its input 
> double/float number which is not what user might expect for negative values. 
> (i.e currently bigint(-1.1) returns -2, not -1).
> We need to change it to round towards zero instead. (bigint(-1.1) should 
> return -1)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to