asolimando commented on a change in pull request #2592:
URL: https://github.com/apache/calcite/pull/2592#discussion_r735855625



##########
File path: 
cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraEnumerator.java
##########
@@ -118,7 +123,8 @@ private Object convertToEnumeratorObject(Object obj) {
               tupleValue.get(i,
                   CassandraSchema.CODEC_REGISTRY.codecFor(
                       tupleValue.getType().getComponentTypes().get(i)))
-          ).map(this::convertToEnumeratorObject)
+          ).map(Objects::requireNonNull)

Review comment:
       Null values cannot appear within collections in Cassandra, we can't 
write a test case violating it I think.
   If it wasn't a lambda I would have written it as an assertion because it 
must always hold.
   I have added a comment to state explicitly the role of this check, thanks 
for the tip.




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