Source:
<code>private static DataSchema createDataSchema( String dataSource, Interval interval, DimensionsSpec dimensionsSpec, IndexIO indexIO, ObjectMapper jsonMapper, List<TimelineObjectHolder<String, DataSegment>> timelineSegments, Map<DataSegment, File> segmentFileMap ) throws IOException, SegmentLoadingException { final List<QueryableIndex> segments = loadSegments(timelineSegments, segmentFileMap, indexIO); final boolean rollup = segments.stream().allMatch(index -> index.getMetadata().isRollup()); final List<AggregatorFactory[]> aggregatorFactories = segments.stream() .map(index -> index.getMetadata().getAggregators()) .collect(Collectors.toList()); final AggregatorFactory[] mergedAggregators = AggregatorFactory.mergeAggregators(aggregatorFactories); if (mergedAggregators == null) { throw new ISE("Failed to merge aggregators[%s]", aggregatorFactories); } final List<AggregatorFactory> combiningAggregatorList = Arrays.stream(mergedAggregators) .map(AggregatorFactory::getCombiningFactory) .collect(Collectors.toList()); final AggregatorFactory[] combiningAggregators = combiningAggregatorList.toArray( new AggregatorFactory[combiningAggregatorList.size()] ); final GranularitySpec granularitySpec = new ArbitraryGranularitySpec( new NoneGranularity(), rollup, ImmutableList.of(interval) ); return new DataSchema( dataSource, <START> dimensionsSpec == null ? ImmutableMap.of("type", "noop") <END> : ImmutableMap.of( "type", "noop", "parseSpec", ImmutableMap.of("type", "timeAndDims", "dimensionsSpec", dimensionsSpec) ), combiningAggregators, granularitySpec, jsonMapper ); }</code><technical_language>more type-safe do jsonMapper.convertValue(parser, JacksonUtils.TYPE_REFERENCE_MAP_STRING_OBJECT), a parser create a normal constructor</technical_language>

Target:
private static DataSchema createDataSchema( String dataSource, Interval interval, DimensionsSpec dimensionsSpec, IndexIO indexIO, ObjectMapper jsonMapper, List<TimelineObjectHolder<String, DataSegment>> timelineSegments, Map<DataSegment, File> segmentFileMap ) throws IOException, SegmentLoadingException { final List<QueryableIndex> queryableIndices = loadSegments(timelineSegments, segmentFileMap, indexIO); final List<AggregatorFactory[]> aggregatorFactories = queryableIndices .stream() .map(index -> index.getMetadata().getAggregators()) .collect(Collectors.toList()); final AggregatorFactory[] mergedAggregators = AggregatorFactory.mergeAggregators(aggregatorFactories); if (mergedAggregators == null) { throw new ISE("Failed to merge aggregators[%s]", aggregatorFactories); } final boolean rollup = queryableIndices.stream().allMatch(index -> index.getMetadata().isRollup()); final GranularitySpec granularitySpec = new ArbitraryGranularitySpec( new NoneGranularity(), rollup, ImmutableList.of(interval) ); final DimensionsSpec finalDimensionsSpec = dimensionsSpec == null ? createDimensionsSpec(queryableIndices) : dimensionsSpec; final InputRowParser parser = new NoopInputRowParser(new TimeAndDimsParseSpec(null, finalDimensionsSpec)); return new DataSchema( dataSource, jsonMapper.convertValue(parser, JacksonUtils.TYPE_REFERENCE_MAP_STRING_OBJECT), mergedAggregators, granularitySpec, null, jsonMapper ); }