Provides a way to implement a table function that only needs one copy to participate and does not care which AMP the copy runs on.
Situation | FNC_TblFirstParticipant Return Value |
---|---|
Copy of the table function is the first copy to call FNC_TblFirstParticipant. | 1 This copy of the function participates in the current transaction and request. |
Copy of the table function is not the first copy to call FNC_TblFirstParticipant. | 0 |
Copy of the table function calls FNC_TblFirstParticipant in the wrong mode or phase. | -1 |
Use this library function when the return value of FNC_GetPhase is TBL_MODE_CONST, indicating that the SELECT statement invoked the table function with constant expression input arguments. For example:
SELECT * FROM TABLE (table_function_1('STRING_CONSTANT')) AS table_1;