private BsonValue visitBinary(Call call, Expression left, Expression right) {
      Operator op = call.operator();

      String mongoOp;
      if (op == Operators.EQUAL) {
        mongoOp = "$eq";
      } else if (op == Operators.NOT_EQUAL) {
        mongoOp = "$ne";
      } else if (op == Operators.IN) {
        mongoOp = "$in";
      } else if (op == Operators.NOT_IN) {
        mongoOp = "$in"; // will be wrapped in $not: {$not: {$in: ... }}
      } else {
        throw new UnsupportedOperationException(String.format("Unknown operator %s for call %s", op, call));
      }

      BsonArray args = new BsonArray();
      args.add(left.accept(this));
      args.add(right.accept(this));

      BsonDocument expr = new BsonDocument(mongoOp, args);
      if (op == Operators.NOT_IN) {
        // for aggregations $nin does not work
        // use {$not: {$in: ... }} instead
        expr = new BsonDocument("$not", expr);
      }

      return Filters.expr(expr).toBsonDocument(BsonDocument.class, codecRegistry);
    }
Visitor used when special {@code $expr} needs to be generated like {@code field1 == field2}
in mongo it would look like:

<pre>
  {@code
    $expr: {
    $eq: [
      "$field1",
      "$field2"
    ]
  }
  }
</pre>
@see <a href="https://docs.mongodb.com/manual/reference/operator/query/expr/">$expr</a>
criteria/mongo/src/org/immutables/criteria/mongo/FindVisitor.java