The Scalding reference on Github (https://github.com/twitter/scalding/wiki/Fields-based-API-Reference#map-functions) says the following:
MapTo is equivalent to mapping and then projecting to the new fields, but is more efficient. Thus, the following two lines produce the same result:
pipe.mapTo(existingFields -> additionalFields){ ... } pipe.map(existingFields -> additionalFields){ ... }.project(additionalFields)
My question is:
- How is mapTo more efficient than map?