richardstartin commented on a change in pull request #8211:
URL: https://github.com/apache/pinot/pull/8211#discussion_r808539411



##########
File path: 
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java
##########
@@ -527,7 +530,7 @@ private void updateDictionary(GenericRow row) {
       IndexContainer indexContainer = entry.getValue();
       Object value = row.getValue(column);
       MutableDictionary dictionary = indexContainer._dictionary;
-      if (dictionary != null) {
+      if (dictionary != null && value != null) {

Review comment:
       I added a test case to provoke this, if null gets into the `GenericRow` 
and it's not removed, an NPE is thrown here. Since this can and does cause 
index corruption, I would prefer to be prudent here even if it may be redundant 
in some cases.




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

Reply via email to