You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/04/01 00:03:16 UTC

[GitHub] [geode] agingade edited a comment on pull request #6200: GEODE-9004: Fix issues in queries targeting a Map field

agingade edited a comment on pull request #6200:
URL: https://github.com/apache/geode/pull/6200#issuecomment-811539256


   @albertogpz 
   Thanks for your contributions to make the query engine robust. Sorry for delay in responding...
   
   Here is what I believe should be happening.
   - The result for a query should be consistent in both using index or non-index case.
   
   - The query engine returns UNDEFINED when it is unable to find the next level field. 
   E.g: if address.city and address is null (This is documented). 
   This is not same when you are looking for a non existing "key" in the map; UNDEFINED needs to be returned when positions is null and query is trying to access field from it. 
   E.g.: positions['*']  should be returning UNDEFINED. 
   
   - Query engine supports heterogenous objects stored in a region. 
   E.g: Employee or Customer. 
   Inline with supporting this, its designed/architected such that if a field is not found in the object it will be ignored. 
   E.g query with employeeID is not going to return customer objects unless it has that field. 
   
   - To be inline with the above design (query expectation), when a map field is not present available it should ignore that entry/object from adding to the result.
   E.g. if positions['SUN'] if SUN key is not present query should ignore that object. 
   This is also different from null check.
   If there is a SUN key with null value it should be returned for queries looking for null value. And non null check will return if the key is there and its value is not null.
   Try the query with non map field and the behavior should be same.
   
   Please let me know if you have any questions on the expected behavior.
   
   The overall behavior of the query on map should be in-line with non-map fields. 
   
   The usage of index should not be avoided; unless the results are inconsistent with non-index query results. Instead of avoiding/blocking the use of index, it will be good to address the issues with indexed queries and make the behavior consistent.
   
   Can you confirm above requirements are met in this PR.
    
   


-- 
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:
users@infra.apache.org