Skip to content

Commit

Permalink
Add docId and column name to segment read exception (#9512)
Browse files Browse the repository at this point in the history
  • Loading branch information
KKcorps authored Oct 3, 2022
1 parent 3f25471 commit 421154f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}
}

0 comments on commit 421154f

Please sign in to comment.