egalpin commented on code in PR #11035:
URL: https://github.com/apache/pinot/pull/11035#discussion_r1253735749


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/ComparisonColumns.java:
##########
@@ -78,18 +69,10 @@ public int compareTo(ComparisonColumns other) {
     // _comparisonColumns should only at most one non-null comparison value 
for newly ingested data. If not, it is
     // the user's responsibility. There is no attempt to guarantee behavior in 
the case where there are multiple
     // non-null values
-    int comparisonResult;
-
     Comparable comparisonValue = _values[_comparableIndex];
     Comparable otherComparisonValue = other.getValues()[_comparableIndex];
 
-    if (otherComparisonValue == null) {
-      // Keep this record because the existing record has no value for the 
same comparison column, therefore the
-      // (lack of) existing value could not possibly cause the new value to be 
rejected.
-      comparisonResult = 1;
-    } else {
-      comparisonResult = comparisonValue.compareTo(otherComparisonValue);
-    }
+    int comparisonResult = comparisonValue.compareTo(otherComparisonValue);

Review Comment:
   no more null-checking required, because _values will always hold all 
non-null entries (where some may be `<defaultNullValue>`



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