Scalar functions
A scalar function that receives arguments that are all literals in a query with no user tables runs on the host. A scalar function that is deterministic and takes all literals runs on the host. Otherwise, the function can run on the host or SPUs, depending on the decision of the query optimizer. However, the sizer always runs on the host even if the scalar function logic runs on the SPU. For more information, see Introduction to shapers and sizers.