You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "egalpin (via GitHub)" <gi...@apache.org> on 2023/07/05 22:57:13 UTC

[GitHub] [pinot] egalpin commented on a diff in pull request #11035: Removes special null-but-not-null case in multiple comparison columns

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


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java:
##########
@@ -550,12 +550,12 @@ private Comparable getComparisonValue(GenericRow row) {
             "Documents must have exactly 1 non-null comparison column value");
 
         comparableIndex = i;
-
-        Object comparisonValue = row.getValue(columnName);
-        Preconditions.checkState(comparisonValue instanceof Comparable,
-            "Upsert comparison column: %s must be comparable", columnName);
-        comparisonValues[i] = (Comparable) comparisonValue;
       }
+

Review Comment:
   this change means that we always set a non-null value for each index of `comparisonValues`, whereas previous all indices != `comparableIndex` would be null.



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org