You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/04/27 17:59:17 UTC

[GitHub] [druid] suneet-s commented on a change in pull request #9742: Adjust string comparators used for ingestion

suneet-s commented on a change in pull request #9742:
URL: https://github.com/apache/druid/pull/9742#discussion_r416029670



##########
File path: processing/src/main/java/org/apache/druid/segment/StringDimensionIndexer.java
##########
@@ -399,23 +399,42 @@ public int compareUnsortedEncodedKeyComponents(int[] lhs, int[] rhs)
     int lhsLen = lhs.length;
     int rhsLen = rhs.length;
 
-    int retVal = Ints.compare(lhsLen, rhsLen);
+    int lenCompareResult = Ints.compare(lhsLen, rhsLen);
+    if (lenCompareResult != 0) {
+      // if the values don't have the same length, check if we're comparing [] and [null], which are equivalent

Review comment:
       @jon-wei Should [1] and [1, null] not be equivalent?




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

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



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