@Override public RecordReader<NullWritable, DruidWritable> createRecordReader(InputSplit split,
      TaskAttemptContext context) throws IOException, InterruptedException {
    // By default, we use druid scan query as fallback.
    final String druidQueryType = context.getConfiguration().get(Constants.DRUID_QUERY_TYPE, Query.SCAN);
    // We need to provide a different record reader for every type of Druid query.
    // The reason is that Druid results format is different for each type.
    //noinspection unchecked
    return getDruidQueryReader(druidQueryType);
  }
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