/** * Convert the tables in the table group to a set of dimension and metric columns. * * @param tableGroup The collection of table group physical tables. * @param granularity The granularity for this schema * @param metricDictionary The dictionary to build logical metrics from names. * * @return The union of all columns from the table group */ private static LinkedHashSet<Column> buildLogicalColumns( TableGroup tableGroup, Granularity granularity, MetricDictionary metricDictionary ) { return Stream.concat( tableGroup.getDimensions().stream() .map(DimensionColumn::new), buildMetricColumns(tableGroup.getApiMetricNames(), granularity, metricDictionary) ).collect(Collectors.toCollection(LinkedHashSet::new)); }