dsmiley commented on code in PR #4873:
URL: https://github.com/apache/solr/pull/4873#discussion_r3930256747


##########
solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/ComplementStream.java:
##########
@@ -201,9 +210,12 @@ public Tuple read() throws IOException {
       }
 
       // if a != b && a < b then we know there is no b which a might equal so 
return a
-      if (!eq.test(a, b) && streamA.getStreamSort().compare(a, b) < 0) {
-        streamB.pushBack(b);
-        return a;
+      if (!eq.test(a, b)) {
+        eq.assertFieldsPresent(a, b);

Review Comment:
   This check is going to be on every tuple reaching this point (and same for 
other call-sites in this PR).  It has _some_ overhead (hashmap lookups) but it 
saves frustration / trust issues.  I think it's the right trade-off.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to