1. A method for processing large data sets using a composite function, the method comprising: receiving, by one or more processors, a query for processing in a map-reduce framework, wherein the query comprises a first function (G) and a second function (F) against data; receiving, by one or more processors, a specification of data partitions, comprising a complete set of keys for the data partitions; computing, by one or more mappers, the first function (G) against the data, for the data partitions, to form partial results, wherein the partial results comprise aggregate values of the first function (G) for each data partition of the data partitions; passing, by the one or more mappers, the partial results using the complete set of keys, to one or more reducers, wherein each of the one or more reducers receives the aggregate values of the first function (G) from the one or more mappers; aggregating, by the one or more reducers, the received aggregate values of the first function (G) into an overall value of the first function (G) for the data partitions; computing, by the one or more reducers, a set of first function (G) results for each data partition of the data partitions; applying, by the one or more reducers, the second function (F) to the set of first function (G) results, to form results for each of the data partitions; and receiving, by one or more processors, results from each of the data partitions a result of the query wherein the result of the query is computed from F j =F(X j , G(X 1 ),. .. , G(X p )), j=1,. .. , P, using an additive function against the results from each of the data partitions, wherein G(X) is aggregated for each data set X located on each of the data partitions X 1 ,. .. , X p , and function and F(X j ) is a reducing function computed for a given data set partition X j .