[ https://issues.apache.org/jira/browse/ASTERIXDB-2372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16454858#comment-16454858 ]
Taewoo Kim commented on ASTERIXDB-2372: --------------------------------------- id = 1.0 is a valid predicate for an equality search on an integer index. So, id >= 1 and id <=1 will return one result (id = 1). But, id = 1.3 is not a valid predicate. However, id >=1 and id <=2 return two results (id =1 and id = 2). Thus, we need to remove the inclusiveness option. So, in short, if ceil( x ) = floor ( x ), we maintain the current framework (id >= floor( x ) and id <= ceil ( x )). If not, we remove the inclusiveness option. > Providing a float value predicate to an integer primary index does not work > as expected. > ---------------------------------------------------------------------------------------- > > Key: ASTERIXDB-2372 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-2372 > Project: Apache AsterixDB > Issue Type: Bug > Reporter: Taewoo Kim > Assignee: Taewoo Kim > Priority: Critical > > If we have an integer primary index and feed a float value predicate that is > not an integer such as 1.3, the search result is not correct. > > The DDL and DML > {code:java} > drop dataverse test if exists; > create dataverse test; > use test; > create type MyRecord as closed { > id: int64 > }; > create dataset MyData(MyRecord) primary key id; > insert into MyData({"id":1}); > insert into MyData({"id":2}); > select * from MyData where id = 1.3;{code} > > The result should be empty. But, it returns 1 and 2 as the result. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)