Jackie-Jiang commented on a change in pull request #8211:
URL: https://github.com/apache/pinot/pull/8211#discussion_r809489878



##########
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:
       Agree we should avoid NPE here. Let's add a separate check for `value != 
null` and log an error + emit a metric when it happens, then skip the value 
processing

##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/metrics/ServerMeter.java
##########
@@ -65,6 +65,7 @@
   SEGMENT_DOWNLOAD_FAILURES("segments", false),
   NUM_RESIZES("numResizes", false),
   NO_TABLE_ACCESS("tables", true),
+  FAILED_INDEX_VALUES("attribute values", true),

Review comment:
       Rename to `INDEX_VALUE_FAILURES` and change unit to camel case to be 
consistent with other meters?




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