You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/06/04 18:18:00 UTC

[jira] [Commented] (ASTERIXDB-2375) Float to Double promotion causes comparison fail in ComparisonHelper

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

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

Commit 6cbc7f0333dcbf546a940a0d8175e3d4ac1485a1 in asterixdb's branch refs/heads/master from [~idleft]
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=6cbc7f0 ]

[ASTERIXDB-2375][RT] Evaluate constant experession in SELECT only once

- user model changes: none
- storage format changes: none
- interface changes: new method added to ComparisonHelper to handle
cached value.

Currently, in datascan case, the constant value is evaluated on per
tuple bases. We could cache the value to avoid the deserialization of
the constant value each time.

Change-Id: Iae4e78928da2bd63b2984b3624b88baed9b7cd73
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2621
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dm...@couchbase.com>


> Float to Double promotion causes comparison fail in ComparisonHelper
> --------------------------------------------------------------------
>
>                 Key: ASTERIXDB-2375
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2375
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Xikui Wang
>            Assignee: Xikui Wang
>            Priority: Major
>
> In the ComparisonHelper, when the two compared values have different types, we promote the lower precision one to higher and compare. This causes an issue when checking equality of float and double, the float is cast to double but failed at comparison as the prevision is widened. One example is 
> select * from Supplier s where s.salary = 83.44;
> The 83.44 in the database is casted to 83.4397***** which is not equal to 83.44.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)