albertogpz opened a new pull request #6096:
URL: https://github.com/apache/geode/pull/6096


   Several changes have been made to solve issues
   found when running queries targeting a Map field
   with and without indexes in the Map field.
   
   - For queries without an index in the Map field
   the behavior has been changed so that
   for queries like "positions['SUN'] = null" instead
   of returning those entries fulfiling
   that condition and also those entries
   where the Map does not contain the 'SUN' key
   or the Map is null, it now returns
   only entries where the Map contains the
   'SUN' key and the value is equal to null.
   
   - As a consequence of the above, queries
   without an index in the Map field like
   "positions['SUN'] != null" will now return
   any entry that does not contain
   the positions field Map with the 'SUN' key
   and with value equal to null.
   
   - For queries with an index in the Map field,
   either specifying several keys or '*'
   the behavior has been modified (fixed) so that
   "!=" conditions targeting the indexed
   Map fields return the same entries returned
   when the index is not present. Prior to this
   change, only entries containing the Map
   were returned but if the Map was not
   present in the entry then that entry was
   not returned.
   
   - Indexes for a field Map
   specifying just one key, e.g.
   positions['SUN'] have been changed
   internally from Range indexes
   to Map indexes in order to align
   the behavior with Map indexes
   (those that specified more than
   one key or '*' for a Map field)
   so that the space taken by this type
   of index is equivalent to the
   one taken by one specifying
   more than one key for the Map.
   This has also solved some wrong
   behavior of these indexes that
   sometimes did not return the expected
   number of entries.
   The drawback of this change is that
   "!=" queries for the map field
   will not make use of the index.
   
   Thank you for submitting a contribution to Apache Geode.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in 
the commit message?
   
   - [ ] Has your PR been rebased against the latest commit within the target 
branch (typically `develop`)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   - [ ] Does `gradlew build` run cleanly?
   
   - [ ] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   ### Note:
   Please ensure that once the PR is submitted, check Concourse for build 
issues and
   submit an update to your PR as soon as possible. If you need help, please 
send an
   email to [email protected].
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to