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


   …d with != conditions except for * case
   
   commit 16150cdeb0860ce0dadc35248a358140c6b92d33
   Author: Alberto Gomez <[email protected]>
   Date:   Sat Mar 27 09:45:41 2021 +0100
   
       Allow map index to be used with != conditions except for * case
   
   commit 8a8e629ef2d0228d83793834c4bc74a325800486
   Author: Alberto Gomez <[email protected]>
   Date:   Wed Mar 31 10:30:19 2021 +0200
   
       GEODE-9004: Update some comments in test cases after review
   
   commit 1784eac89c64b621910a039b03540f5dd39764a4
   Author: Alberto Gomez <[email protected]>
   Date:   Tue Mar 30 18:03:30 2021 +0200
   
       GEODE-9004_1: Update after review. Fixed queries with non-compact 
indexes and added comments in test cases
   
   commit d1fe48a261486c6ca956dec0f98197ab8f76062b
   Author: Alberto Gomez <[email protected]>
   Date:   Mon Mar 29 17:18:15 2021 +0200
   
       GEODE-9004: Add comments to test cases and small update
   
   commit 150e73ec6fb9340c41c799e315686e30d197c1dc
   Author: Alberto Gomez <[email protected]>
   Date:   Fri Mar 26 12:53:45 2021 +0100
   
       GEODE-9004: Fix issues in queries targeting a Map field
   
       Queries in which map fields are involved
       in the condition, sometimes do not return the same entries
       if map indexes are used, compared to when map indexes
       are not used.
   
       Diferences were found when the condition on the
       map field was of type '!=' and also when the condition
       on the map field was comparing the value with null.
   
       Example1:
       Running a query with the following condition:
       positions['SUN'] = null
   
       in a region with the following entries:
       entry1.positions=null
       entry2.positions={'a'=>'b'}
       entry3.positions={'SUN'=>null}
   
       - will return entry1 and entry3 if there are no
         indexes defined.
       - will return no entries if the following index is defined:
         positions['SUN','c']
       - will return entry3 if the following index is defined:
         positions[*]
   
       Example2:
       Running a query with the following condition:
       positions['SUN'] != '3'
   
       in a region with the following entries:
       entry1.positions=null
       entry2.positions={'a'=>'b'}
       entry3.positions={'SUN'=>'4'}
       entry4.positions={'SUN'=>'3'}
       entry5.positions={'SUN'=>null}
   
       - will return all entries except for entry4 if:
         there are no indexes defined.
       - will return entry3 if the following index is defined:
         positions['SUN','c']
       - will return entry3 and entry5 if the following index is defined:
         positions[*]
   
       In order to have the same results for these
       queries no matter if indexes are used,
       the following changes have been made:
       - When running queries, the result of getting the
       value from a Map that does not contain the key used
       to access the value will be
       considered UNDEFINED instead of null.
       This will imply that queries where the condition is
       positions['SUN'] = null will not return entries
       that do not have the 'SUN' key in the positions Map.
   
       - Queries with map indexes will not be able to use
       the indexes if the query is of type '!=' against
       any of the indexed map fields.
       Example:
       for index positions['SUN', 'ERIC'] or
       positions[*]
       the following query will not use indexes:
       positions['SUN'] != '44'
   
       These changes must be documented accordingly
       in the corresponding indexes section.
   
   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