Skip to content

Commit

Permalink
Change a NPE to have a better error message (#5482)
Browse files Browse the repository at this point in the history
  • Loading branch information
prm-dan committed Jun 28, 2020
1 parent bd5957a commit a3faa2f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ public ImmutableSegmentImpl(SegmentDirectory segmentDirectory, SegmentMetadataIm

@Override
public Dictionary getDictionary(String column) {
return _indexContainerMap.get(column).getDictionary();
ColumnIndexContainer container = _indexContainerMap.get(column);
if (container == null) {
throw new NullPointerException("Invalid column: " + column);
}
return container.getDictionary();
}

@Override
Expand Down

0 comments on commit a3faa2f

Please sign in to comment.