- Call FNC_TblGetNodeData to get the list of all node numbers and AMP vproc numbers.
- Determine which AMP vprocs will run copies of the table function.
For example, if only one AMP vproc is supposed to participate per node, the logic can simply pick the first AMP vproc on each node in the list, because the information is returned in ascending order.
- Call FNC_AMPInfo to get the local node and AMP vproc number.
For table functions:
IF the local node and AMP vproc number … THEN … were selected to run a copy of the table function participate in table function processing. were not selected to run a copy of the table function call FNC_TblOptOut.
For table operators, include an if statement to determine whether the local node and AMP were selected. If they were selected, the control flow goes through the processing of the operator. Otherwise, processing is skipped.
This function can only be called from within a table function or a table operator. Calling this function from a scalar function, aggregate function, UDM, or external stored procedure results in an exception on the transaction.