rubenada commented on code in PR #5213:
URL: https://github.com/apache/calcite/pull/5213#discussion_r4259567804


##########
mongodb/src/main/java/org/apache/calcite/adapter/mongodb/MongoSchemaFactory.java:
##########
@@ -40,7 +42,7 @@ public MongoSchemaFactory() {
   @Override public Schema create(SchemaPlus parentSchema, String name,
       Map<String, Object> operand) {
     final String host = (String) operand.get("host");
-    final String database = (String) operand.get("database");
+    final String database = requireNonNull((String) operand.get("database"), 
"database");

Review Comment:
   `database` (and also `password` in line 66) now `requireNonNull`, why is 
this needed?
   In the switch below, `GSSAPI` and `MONGODB_X509` cases do not use them (they 
use just `username`), so maybe the nonNull check should be applied on the cases 
that do use these values?



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