diff --git a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java index b4fafbbc2308..c84454a04175 100644 --- a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java +++ b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java @@ -229,7 +229,8 @@ public GenericRow getRecord(int docId, GenericRow reuse) { _pinotSegmentRecordReader.getRecord(reuse, docId); return reuse; } catch (Exception e) { - throw new RuntimeException("Failed to use PinotSegmentRecordReader to read immutable segment"); + throw new RuntimeException( + String.format("Failed to use PinotSegmentRecordReader to read immutable segment for docId: %d", docId), e); } } @@ -242,7 +243,9 @@ public Object getValue(int docId, String column) { } return _pinotSegmentRecordReader.getValue(docId, column); } catch (Exception e) { - throw new RuntimeException("Failed to use PinotSegmentRecordReader to read value from immutable segment"); + throw new RuntimeException( + String.format("Failed to use PinotSegmentRecordReader to read value from immutable segment" + + " for docId: %d, column: %s", docId, column), e); } } }