use of com.dangdang.ddframe.rdb.sharding.parser.result.merger.IndexColumn in project sharding-jdbc by dangdangdotcom.
the class ResultSetMergeContext method getAllFocusedColumns.
private List<IndexColumn> getAllFocusedColumns() {
List<IndexColumn> result = new LinkedList<>();
result.addAll(mergeContext.getGroupByColumns());
result.addAll(mergeContext.getOrderByColumns());
LinkedList<AggregationColumn> allAggregationColumns = Lists.newLinkedList(mergeContext.getAggregationColumns());
while (!allAggregationColumns.isEmpty()) {
AggregationColumn firstElement = allAggregationColumns.poll();
result.add(firstElement);
if (!firstElement.getDerivedColumns().isEmpty()) {
allAggregationColumns.addAll(firstElement.getDerivedColumns());
}
}
return result;
}
Aggregations