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 2020/08/26 04:42:37 UTC

[GitHub] [incubator-pinot] icefury71 commented on a change in pull request #5923: Null check for invalid column name

icefury71 commented on a change in pull request #5923:
URL: https://github.com/apache/incubator-pinot/pull/5923#discussion_r477030178



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/indexsegment/immutable/ImmutableSegmentImpl.java
##########
@@ -91,7 +94,10 @@ public SegmentMetadataImpl getSegmentMetadata() {
 
   @Override
   public DataSource getDataSource(String column) {
-    return new ImmutableDataSource(_segmentMetadata.getColumnMetadataFor(column), _indexContainerMap.get(column));
+    ColumnMetadata columnMetadata = _segmentMetadata.getColumnMetadataFor(column);
+    Preconditions.checkNotNull(columnMetadata,

Review comment:
       As mentioned in the issue #5899 , currently a NullPointerException is being thrown back (without any helpful information to debug). Precondition is just a way to improve the debuggability/readability. 
   
   Lemme know if you have a good suggestion for this.




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

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