zoov-w commented on code in PR #4452:
URL: https://github.com/apache/calcite/pull/4452#discussion_r2205631281


##########
mongodb/src/main/java/org/apache/calcite/adapter/mongodb/MongoFilter.java:
##########
@@ -267,5 +290,14 @@ private void translateOp2(String op, String name, 
RexLiteral right,
         multimap.put(name, Pair.of(op, right));
       }
     }
+
+    /** Translates is null/is not null to $exists. */
+    private Void translateUnary(RexCall call,
+        Multimap<String, Pair<String, RexLiteral>> multimap, Map<String, 
RexLiteral> eqMap) {
+      boolean isNull = call.getKind() == SqlKind.IS_NULL;
+      final RexNode node = call.operands.get(0);
+      translateBinary2("$exists", node, rexBuilder.makeLiteral(isNull), 
multimap, eqMap);

Review Comment:
   I'm sorry I ignored this test case.



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