zoov-w opened a new pull request, #4450:
URL: https://github.com/apache/calcite/pull/4450

   JIRA: https://issues.apache.org/jira/browse/CALCITE-7079
   
   Mongodb adapter translate more than one $ne condition error.
   
   run sql:
   ` select city, state from zips where city <> 'ABERDEEN' and city <> 'AIKEN' `
   
   query plan:
   `{
     "$match": {
       "city": {
         "$ne": "AIKEN"
       }
     }
   }, {$project: {CITY: '$city', STATE: '$state'}}
   `
   
   The condition (city <> 'ABERDEEN') lost,actually, more than one $ne 
condition conpose of AND have to translate to $nin operation, such as:
   `
   {
     "$match": {
       "city": {
         "$nin": [
           "AIKEN",
           "ABERDEEN"
         ]
       }
     }
   }, {$project: {CITY: '$city', STATE: '$state'}} 
    `


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to