fix issue with nested column null value index incorrectly matching non-null values#13211
Merged
cheddar merged 1 commit intoapache:masterfrom Oct 11, 2022
Merged
Conversation
abhishekagarwal87
approved these changes
Oct 11, 2022
| // 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) { |
Contributor
There was a problem hiding this 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.
clintropolis
added a commit
to clintropolis/druid
that referenced
this pull request
Oct 28, 2022
kfaraz
pushed a commit
that referenced
this pull request
Nov 1, 2022
* use object[] instead of string[] for vector expressions to be consistent with vector object selectors (#13209) * fix issue with nested column null value index incorrectly matching non-null values (#13211) * fix json_value sql planning with decimal type, fix vectorized expression math null value handling in default mode (#13214)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes a mistake in
NestedFieldLiteralColumnIndexSupplierwhen creatingNullValueIndex, where it was incorrectly always returning the bitmap for the first dictionary entry, instead of first confirming that this value is actuallynull. While the global value dictionary entry 0 is always null, within the local dictionary of the nested literal column, dictionary id must point to the global id 0 for the first bitmap entry to be the null value bitmap. If this is not the case, an empty bitmap should be used since the column contains no null values.This fixes queries using
IS NULLorIS NOT NULLfilters on nested columns that do not contain a null value in every segment, which presents as having a single value per segment matched and returned in the resultsThis PR has: