Codegen fixes.
Add hashmap iterator.
Reduce query/selection/dimension.