Issue Details (XML | Word | Printable)

Key: NUCCORE-1048
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Minor Minor
Assignee: Unassigned
Reporter: Dmitry Treskunov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Core

InMemory query evaluation with a NULL value in inspected field fails

Created: 29/May/13 01:40 PM   Updated: 28/Nov/13 03:20 PM   Resolved: 28/Nov/13 03:19 PM
Component/s: Queries
Affects Version/s: 3.2.3
Fix Version/s: None

Datastore: MongoDB


 Description  « Hide
1. There are two documents in MongoDB:
{ "_id" : { "$oid" : "51a5e77c42c1f86d475df6b5"} , "name" : "Mike" , "id" : "1" , "groups" : [ "Admin" , "USA"] , "birthday" : { "$date" : "2013-05-29T11:33:16.716Z"}}
{ "_id" : { "$oid" : "51a5e77c42c1f86d475df6b6"} , "name" : "Ivan" , "id" : "2" , "groups" : [ "Admin" , "RUSSIA"]}

2. Trying to do search by the following filter:

"groups.contains(parameter_0) && birthday <= parameter_1"

3. DataNucleus can't execute this query in MongoDb, so it retrieve all documents from MongoDb and tries to filter them. But one of them has NULL value in 'birthday' field.
It causes the next exception:

javax.jdo.JDOException: Impossible to evaluate less_equals expression between null and Wed May 29 15:35:40 MSK 2013 due to presence of null!

But I expect, this document with 'birthday == null' will be filtered out from result.

See appropriate test case here https://github.com/dmitry-treskunov/test-jdo


Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 28/Nov/13 03:19 PM
This shows no problem using current versions; maybe it was fixed by some of the contribs that have gone into the MongoDB plugin, or maybe by some core changes. Anyway nothing demonstrated with this test