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 2022/10/11 13:07:58 UTC

[GitHub] [druid] abhishekagarwal87 commented on a diff in pull request #13211: fix issue with nested column null value index incorrectly matching non-null values

abhishekagarwal87 commented on code in PR #13211:
URL: https://github.com/apache/druid/pull/13211#discussion_r992303841


##########
processing/src/main/java/org/apache/druid/segment/nested/NestedFieldLiteralColumnIndexSupplier.java:
##########
@@ -108,8 +108,14 @@ public NestedFieldLiteralColumnIndexSupplier(
   public <T> T as(Class<T> clazz)
   {
     if (clazz.equals(NullValueIndex.class)) {
-      // null index is always 0 in the global dictionary, even if there are no null rows in any of the literal columns
-      return (T) (NullValueIndex) () -> new SimpleImmutableBitmapIndex(bitmaps.get(0));
+      final BitmapColumnIndex nullIndex;
+      if (dictionary.get(0) == 0) {

Review Comment:
   it would have been nicer to have these constants (RHS) defined at the top - something like GLOBAL_DICTIONARY_NULL_INDEX. Some other day perhaps. 



-- 
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@druid.apache.org

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