Builder elementBuilder = Value.builder().rdata(entry.getValue().get(i));
// chance of index out of bounds
if (i < labels.size())
elementBuilder.label(labels.get(i));
if (i < weights.size())
elementBuilder.weight(weights.get(i));
rset.add(elementBuilder.build());
}
rsets.add(rset.build());
}
builder.recordSets(rsets.build());