Fork me on GitHub
#flambo
<
2017-10-10
>
gareth07:10:51

hi all, is there any support in Flambo to register user defined function in SparkSQL? does anyone know how to do it if not?

gareth07:10:45

I'm trying a few things but can't get a call to match the register function signature

gareth08:10:42

after a bit of thought I've created a flambo.function/gen-sql-udf macro by copying the flambo.function/gen-function macro. The gen-sql-udf implements org.apache.spark.sql.api.java.%s where I've tested %s with UDF1. Using my local build I've managed to register and call a 1-arity function using selectExpr function on a SparkSQL Dataset. I'm going to experiment a bit more.