vrajat commented on code in PR #12151:
URL: https://github.com/apache/pinot/pull/12151#discussion_r1427519144


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentColumnarIndexCreator.java:
##########
@@ -315,11 +316,14 @@ public void indexRow(GenericRow row)
 
       FieldSpec fieldSpec = _schema.getFieldSpecFor(columnName);
       SegmentDictionaryCreator dictionaryCreator = 
_dictionaryCreatorMap.get(columnName);
-
-      if (fieldSpec.isSingleValueField()) {
-        indexSingleValueRow(dictionaryCreator, columnValueToIndex, 
creatorsByIndex);
-      } else {
-        indexMultiValueRow(dictionaryCreator, (Object[]) columnValueToIndex, 
creatorsByIndex);
+      try {
+        if (fieldSpec.isSingleValueField()) {
+          indexSingleValueRow(dictionaryCreator, columnValueToIndex, 
creatorsByIndex);
+        } else {
+          indexMultiValueRow(dictionaryCreator, (Object[]) columnValueToIndex, 
creatorsByIndex);
+        }
+      } catch (JsonParseException jpe) {

Review Comment:
   In any level higher than `SegmentColumnarIndexCreator`, it is not easy to 
figure out the column name. IIUC, callers of this function, are indexing a row 
and there maybe different indices built for different columns. This is the 
first function that is iterating through all the columns and building an index 
for each one. So columnName is obvious. 
   
   This function passes the column index value instead of names to 
`IndexSingleValueRow`. So names are not available again. 



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