egalpin commented on code in PR #11035:
URL: https://github.com/apache/pinot/pull/11035#discussion_r1253735661
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/ComparisonColumns.java:
##########
@@ -52,18 +52,9 @@ public int compareToSealed(ComparisonColumns other) {
continue;
}
- // Always keep the record with non-null value, or that with the greater
comparisonResult
- if (comparisonValue == null) {
- // implies comparisonValue == null && otherComparisonValue != null
- return -1;
- } else if (otherComparisonValue == null) {
- // implies comparisonValue != null && otherComparisonValue == null
- return 1;
- } else {
- int comparisonResult = comparisonValue.compareTo(otherComparisonValue);
- if (comparisonResult != 0) {
- return comparisonResult;
- }
+ 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]