public static String createScanAllQuery(String dataSourceName, List<String> columns) throws JsonProcessingException {
    final Druids.ScanQueryBuilder scanQueryBuilder = Druids.newScanQueryBuilder();
    final List<Interval> intervals = Collections.singletonList(DEFAULT_INTERVAL);
    ScanQuery
        scanQuery =
        scanQueryBuilder.dataSource(dataSourceName).resultFormat(ScanQuery.ResultFormat.RESULT_FORMAT_COMPACTED_LIST)
            .intervals(new MultipleIntervalSegmentSpec(intervals))
            .columns(columns)
            .build();
    return JSON_MAPPER.writeValueAsString(scanQuery);
  }
@param pushedSegment         the pushed data segment object
@param segmentsDescriptorDir actual directory path for descriptors.
@return a sanitize file name
druid-handler/src/java/org/apache/hadoop/hive/druid/DruidStorageHandlerUtils.java