jihoonson opened a new issue #7621: NPE when both populateResultLevelCache and 
grandTotal are set
URL: https://github.com/apache/incubator-druid/issues/7621
 
 
   ### Affected Version
   
   All versions since 0.13.0
   
   ### Description
   
   The grandTotal doesn't have timestamp and it is filled with null in the 
result set. If `populateResultLevelCache` is set, the below code is executed 
and `input.getTimestamp().getMillis()` throws NPE.
   
   ```java
         @Override
         public Function<Result<TimeseriesResultValue>, Object> 
prepareForCache(boolean isResultLevelCache)
         {
           return input -> {
             TimeseriesResultValue results = input.getValue();
             final List<Object> retVal = Lists.newArrayListWithCapacity(1 + 
aggs.size());
   
             retVal.add(input.getTimestamp().getMillis());
             for (AggregatorFactory agg : aggs) {
               retVal.add(results.getMetric(agg.getName()));
             }
             if (isResultLevelCache) {
               for (PostAggregator postAgg : query.getPostAggregatorSpecs()) {
                 retVal.add(results.getMetric(postAgg.getName()));
               }
             }
             return retVal;
           };
         }
   ```

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to