You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/07/07 00:05:48 UTC

[GitHub] [pinot] walterddr commented on a diff in pull request #9024: adding explicit error on record reader

walterddr commented on code in PR #9024:
URL: https://github.com/apache/pinot/pull/9024#discussion_r915342453


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java:
##########
@@ -998,14 +998,20 @@ public ThreadSafeMutableRoaringBitmap getValidDocIds() {
   @Override
   public GenericRow getRecord(int docId, GenericRow reuse) {
     for (Map.Entry<String, IndexContainer> entry : _indexContainerMap.entrySet()) {
-      String column = entry.getKey();
-      IndexContainer indexContainer = entry.getValue();
-      Object value = getValue(docId, indexContainer._forwardIndex, indexContainer._dictionary,
-          indexContainer._numValuesInfo._maxNumValuesPerMVEntry);
-      if (_nullHandlingEnabled && indexContainer._nullValueVector.isNull(docId)) {
-        reuse.putDefaultNullValue(column, value);
-      } else {
-        reuse.putValue(column, value);
+      try {
+        String column = entry.getKey();
+        IndexContainer indexContainer = entry.getValue();
+        Object value = getValue(docId, indexContainer._forwardIndex, indexContainer._dictionary,
+            indexContainer._numValuesInfo._maxNumValuesPerMVEntry);
+        if (_nullHandlingEnabled && indexContainer._nullValueVector.isNull(docId)) {
+          reuse.putDefaultNullValue(column, value);
+        } else {
+          reuse.putValue(column, value);
+        }
+      } catch (Exception e) {
+        _logger.error("error encountered when getting record for {} on indexContainer: {}", docId, entry.getKey());
+        throw new RuntimeException("error encountered when getting record for " + docId + " on indexContainer: " +
+            entry.getKey(), e);

Review Comment:
   ```suggestion
           throw new RuntimeException("error encountered when getting record for " + docId + " on indexContainer: "
               + entry.getKey(), e);
   ```



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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org