Jackie-Jiang commented on a change in pull request #5476:
URL: https://github.com/apache/incubator-pinot/pull/5476#discussion_r437753947
##########
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:
I would suggest using checkState instead:
```suggestion
Preconditions.checkState(fieldSpec != null, "Column: '%s' does not
exist in the schema", 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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]