Hi Sachith, Yes, that's possible, you just need to implement https://hive.apache.org/javadocs/r0.10.0/api/org/apache/hadoop/hive/ql/udf/generic/GenericUDF.html
Note the class documentation: "A Generic User-defined function (GenericUDF) for the use with Hive. New GenericUDF classes need to inherit from this GenericUDF class. The GenericUDF are superior to normal UDFs in the following ways: 1. It can accept arguments of complex types, and return complex types. 2. It can accept variable length of arguments. 3. It can accept an infinite number of function signature - for example, it's easy to write a GenericUDF that accepts array, array> and so on (arbitrary levels of nesting). 4. It can do short-circuit evaluations using DeferedObject." PS I think this question may have been more suited to the "Spark Users" mailing list Cheers, Joe On 30 July 2015 at 11:00, Sachith Withana <swsach...@gmail.com> wrote: > Hi all, > > Does spark support UDF Method overloading? > > ex: I want to have an UDF with varying number of arguments > > multiply(a,b) > multiply(a,b,c) > > Any suggestions? > > -- > Thanks, > Sachith Withana > -- Best regards, Joe --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@spark.apache.org For additional commands, e-mail: dev-h...@spark.apache.org