Add integration tests for map/reduce-using queries