snleee commented on a change in pull request #5476:
URL: https://github.com/apache/incubator-pinot/pull/5476#discussion_r437027028



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/startree/v2/builder/BaseSingleTreeBuilder.java
##########
@@ -150,7 +151,11 @@
       // Ignore the column for COUNT aggregation function
       if (_valueAggregators[index].getAggregationType() != 
AggregationFunctionType.COUNT) {
         String column = functionColumnPair.getColumn();
-        _metricDataTypes[index] = schema.getFieldSpecFor(column).getDataType();
+        FieldSpec fieldSpec = schema.getFieldSpecFor(column);
+        if (fieldSpec == null) {

Review comment:
       You can write if block into a single line.
   ```
   Precondition.checkNotNull(fieldSpec, "Invalid column: " + column);
   ```

##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/startree/v2/builder/BaseSingleTreeBuilder.java
##########
@@ -150,7 +151,11 @@
       // Ignore the column for COUNT aggregation function
       if (_valueAggregators[index].getAggregationType() != 
AggregationFunctionType.COUNT) {
         String column = functionColumnPair.getColumn();
-        _metricDataTypes[index] = schema.getFieldSpecFor(column).getDataType();
+        FieldSpec fieldSpec = schema.getFieldSpecFor(column);
+        if (fieldSpec == null) {

Review comment:
       You can write if block into a single line.
   ```
   Preconditions.checkNotNull(fieldSpec, "Invalid column: " + column);
   ```




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to