Search in sources :

Example 1 with ScanQueryBuilder

use of org.apache.drill.exec.store.druid.druid.ScanQueryBuilder in project drill by apache.

the class DruidRecordReader method getQuery.

private String getQuery() throws JsonProcessingException {
    int queryThreshold = this.maxRecordsToRead >= 0 ? Math.min(BaseValueVector.INITIAL_VALUE_ALLOCATION, this.maxRecordsToRead) : BaseValueVector.INITIAL_VALUE_ALLOCATION;
    ScanQueryBuilder scanQueryBuilder = plugin.getScanQueryBuilder();
    ScanQuery scanQuery = scanQueryBuilder.build(scanSpec.dataSourceName, this.columns, this.filter, this.nextOffset, queryThreshold, scanSpec.getMinTime(), scanSpec.getMaxTime());
    return objectMapper.writeValueAsString(scanQuery);
}
Also used : ScanQueryBuilder(org.apache.drill.exec.store.druid.druid.ScanQueryBuilder) ScanQuery(org.apache.drill.exec.store.druid.druid.ScanQuery)

Aggregations

ScanQuery (org.apache.drill.exec.store.druid.druid.ScanQuery)1 ScanQueryBuilder (org.apache.drill.exec.store.druid.druid.ScanQueryBuilder)1