Some benefits of multiple-input SQL-MapReduce functions over single-input functions that produce the same output are:
- Prediction functions that use trained models have better performance and security.
A multiple-input prediction function takes the model as a dimensional input, and one or more data inputs to which to apply the model.
- Their inputs need not share a common schema.
- They avoid the joins, unions, and creation of temporary tables their single-input counterparts need.
- They facilitate creating new types of analytic functions (for example, multichannel attribution).
- They use memory better, because:
- Partitioning and grouping of tuples occurs before the function operates on them; therefore, less data is processed by the function.
- One copy of a dimensional input is held in memory and used to operate on all tuples from other inputs.