Optimization for reduce operations on fields