Teradata Aster SQL-MapReduce C API supports three types of functions:
- Row Function. A Row Function corresponds to a map function and must be invoked without a PARTITION BY clause. From an interface perspective, the function will be passed an iterator to an arbitrary set of rows. A Row Function consists of two methods: the contract method, with a name like echo_input_newRowFunction (where "echo_input" is the name of our example row function), and the operate method with a name like, for example, echo_input_operateOnSomeRows.
- Partition Function. A Partition Function corresponds to a reduce function and must be invoked with a PARTITION BY clause. Rows with the same values for the PARTITION BY expressions are brought together onto the same logical worker, and each invocation of the function is passed all the rows in that partition. A Partition Function consists of two methods: the contract method, with a name like geog_filter_newPartitionFunction (using "geog_filter" as an example function name), and the operate method with a name like, for example, geog_filter_operateOnPartition.
- Multiple Input Function. A Multiple Input Function takes one or more partitioned inputs and zero or more dimensional inputs. As such, it is invoked with one or more PARTITION BY clauses (for the partitioned inputs) and zero or more DIMENSION clauses (for the dimensional inputs). A Multiple Input Function consists of two methods: the contract method, with a name like lookup_filter_newMultipleInputFunction (using "lookup_filter" as an example function name), and the operate method with a name like, for example, lookup_filter_operateOnMultipleInputs.