public static DruidQueryRecordReader getDruidQueryReader(String druidQueryType) {
    switch (druidQueryType) {
    case Query.TIMESERIES:
      return new DruidTimeseriesQueryRecordReader();
    case Query.TOPN:
      return new DruidTopNQueryRecordReader();
    case Query.GROUP_BY:
      return new DruidGroupByQueryRecordReader();
    case Query.SCAN:
      return new DruidScanQueryRecordReader();
    default:
      throw new IllegalStateException("Druid query type " + druidQueryType + " not recognized");
    }
  }
Druid query based input format.

Given a query and the Druid broker address, it will send it, and retrieve
and parse the results.
druid-handler/src/java/org/apache/hadoop/hive/druid/io/DruidQueryBasedInputFormat.java