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 return Int or long typesIf input String is in the form of Double return Double. I could create function with Any return type but I am not able register with sqlContext.udf.register statement.I tried Generic type but could not register. Kindly advise me ThanksJayachandra