Kinigopoulos commented on issue #11267:
URL: https://github.com/apache/druid/issues/11267#issuecomment-842913033


   @FrankChen021 thanks for the reply.
   
   My plan was to follow the moving average as an example but it does not 
contain any implementation for RunnerFactory so it doesn't process the segments 
itself (although I wouldn't mind taking the data from a groupBy query and edit 
them from there) but also has that issue (#11266) with ClassCastException
   
   The NPE is being thrown by the Druid code:
   ```
   at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:229)
        at org.apache.druid.query.Query.getMostSpecificId(Query.java:172)
        at 
org.apache.druid.client.CachingClusteredClient.initializeNumRemainingResponsesInResponseContext(CachingClusteredClient.java:217)
        at 
org.apache.druid.client.CachingClusteredClient.run(CachingClusteredClient.java:205)
        at 
org.apache.druid.client.CachingClusteredClient.access$100(CachingClusteredClient.java:116)
        at 
org.apache.druid.client.CachingClusteredClient$2.run(CachingClusteredClient.java:187)
        at 
org.apache.druid.query.RetryQueryRunner.run(RetryQueryRunner.java:108)
        at 
org.apache.druid.server.SetAndVerifyContextQueryRunner.run(SetAndVerifyContextQueryRunner.java:51)
        at org.apache.druid.query.UnionQueryRunner.run(UnionQueryRunner.java:92)
        at 
org.apache.druid.query.ResultMergeQueryRunner.doRun(ResultMergeQueryRunner.java:58)
        at 
org.apache.druid.query.BySegmentSkippingQueryRunner.run(BySegmentSkippingQueryRunner.java:46)
        at 
org.apache.druid.query.FinalizeResultsQueryRunner.run(FinalizeResultsQueryRunner.java:110)
        at 
org.apache.druid.query.CPUTimeMetricQueryRunner.run(CPUTimeMetricQueryRunner.java:65)
        at 
org.apache.druid.query.ResultLevelCachingQueryRunner.run(ResultLevelCachingQueryRunner.java:158)
        at 
org.apache.druid.query.FluentQueryRunnerBuilder$FluentQueryRunner.run(FluentQueryRunnerBuilder.java:55)
        at 
org.apache.druid.server.ClientQuerySegmentWalker$QuerySwappingQueryRunner.run(ClientQuerySegmentWalker.java:511)
        at org.apache.druid.query.QueryRunner.run(QueryRunner.java:38)
   ```
   
   If I include this piece of code below in QueryToolChest, then the query runs 
with no errors and returns an empty result but no runners are getting created 
from the RunnerFactory so basically the problem isn't resolved.
   ```
     @Override
     public QueryRunner<MapBasedRow> mergeResults(QueryRunner<Row> runner) {
         return (queryPlus, responseContext) -> {
             return Sequences.empty();
         };
     }
   ```


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

Reply via email to