diff --git a/server/src/main/java/io/druid/server/ClientQuerySegmentWalker.java b/server/src/main/java/io/druid/server/ClientQuerySegmentWalker.java index d5f20d7f9d7..311f0162c5a 100644 --- a/server/src/main/java/io/druid/server/ClientQuerySegmentWalker.java +++ b/server/src/main/java/io/druid/server/ClientQuerySegmentWalker.java @@ -39,6 +39,7 @@ import io.druid.query.UnionQueryRunner; import org.joda.time.Interval; import javax.annotation.Nullable; +import java.util.Map; /** */ @@ -102,11 +103,16 @@ public class ClientQuerySegmentWalker implements QuerySegmentWalker ); - final PostProcessingOperator postProcessing = objectMapper.convertValue( - query.getContext().get("postProcessing"), - new TypeReference>() { - } - ); + final Map context = query.getContext(); + PostProcessingOperator postProcessing = null; + if(context != null) { + postProcessing = objectMapper.convertValue( + context.get("postProcessing"), + new TypeReference>() + { + } + ); + } return postProcessing != null ? postProcessing.postProcess(baseRunner) : baseRunner;