static CollectNode collect(AbstractDataAnalysis analysis,
List<Symbol> toCollect,
ImmutableList<Projection> projections,
@Nullable String partitionIdent) {
Routing routing = analysis.table().getRouting(analysis.whereClause());
if (partitionIdent != null && routing.hasLocations()) {
routing = filterRouting(routing, PartitionName.fromPartitionIdent(
analysis.table().ident().name(), partitionIdent).stringValue());
}
CollectNode node = new CollectNode("collect", routing);
node.whereClause(analysis.whereClause());