use of io.crate.planner.operators.PKAndVersion in project crate by crate.
the class PKLookupPhase method writeTo.
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
distInfo.writeTo(out);
Symbols.toStream(toCollect, out);
out.writeVInt(idsByShardByNode.size());
for (Map.Entry<String, Map<ShardId, List<PKAndVersion>>> byNodeEntry : idsByShardByNode.entrySet()) {
Map<ShardId, List<PKAndVersion>> idsByShard = byNodeEntry.getValue();
out.writeString(byNodeEntry.getKey());
out.writeVInt(idsByShard.size());
for (Map.Entry<ShardId, List<PKAndVersion>> shardEntry : idsByShard.entrySet()) {
List<PKAndVersion> ids = shardEntry.getValue();
shardEntry.getKey().writeTo(out);
out.writeVInt(ids.size());
for (PKAndVersion id : ids) {
id.writeTo(out);
}
}
}
out.writeVInt(partitionedByColumns.size());
for (ColumnIdent partitionedByColumn : partitionedByColumns) {
partitionedByColumn.writeTo(out);
}
}
Aggregations