Thank you for those pointers.
There are definitely some differences between the kind of UDFs that Spark supports and the kind that Froid handles. For one, Spark UDFs cannot invoke a Spark SQL query in their definition AFAIK, whereas TSQL functions can.
But still, some techniques might be applicable. Definitely worth digging further!