Re: How to register udf with Any or generic Type in spark

2015-10-08 Thread Michael Armbrust
You can't do this with UDFs. All data types have to be known ahead of time. On Thu, Oct 8, 2015 at 8:59 AM, dugasani jcreddy < jcredd...@yahoo.com.invalid> wrote: > Hi, > > I have a requirement to use udf whose return type is not known in spark > data frame sql. > I have below requirement >

How to register udf with Any or generic Type in spark

2015-10-08 Thread dugasani jcreddy
Hi,   I have a requirement  to use udf whose return type is not known in spark data frame sql. I have below requirementfunction takes either String  Or Boolean  data types.function returns 1 or 0 based on whether Input argument is True or False. If input string is in the form Integer or long ret