What are the restrictions on C functions within a User Defined Function (UDF). For example, can we call external libraries or do file I/O? Where is this information documented?
It seems that you can use pretty much anything supported by c++. I was successfully able to link with external libraries and do file IO. One caveat about usage of the boost library: Tigergraph gpe server has certain components of statically linked boost. If your external library has boost components as dynamically linked, there may be conflicts depending upon boost usage in the external library. It would be nice to have Tigergraph move to using the dynamic boost library that is shipped with the Linux distributions to avoid that.
To include a third-party library. Please follow steps:
change this make file: dev/gdk/MakeUDF to include your lib (header and .so)
put your lib .so to the location given in 1. Suggest in tigergraph/bin dir
use TG’s ExprFunctions to embed your function