Can I use SparkSQL "java_method" to call my own Java method?

Viewed 72

SparkSQL has a way of calling a Java method using the java_method function. The doc has an example like this:

SELECT java_method('java.util.UUID', 'randomUUID');

For my project I'd like to create & call my own Java method - however I don't know whether SparkSQL supports this or not. The doc doesn't mention anything about calling custom Java methods.

So, does anyone know how to accomplish this or has anyone already created & called his/her own Java method with SparkSQL? I'd be really interested to know!

Regards, Michael

1 Answers

Yes, you can call and pass parameters as well.

You can use the UDF function too using UDF(function name)

Related