Hi Ritesh, Right now, we only allow specific data types defined in the inputSchema. Supporting abstract types (e.g. NumericType) may cause the logic of a UDAF be more complex. It will be great to understand the use cases first. What kinds of possible input data types that you want to support and do you need to know the actual argument types to determine how to process input data?
btw, for now, one possible workaround is to define multiple UDAFs for different input types. Then, based on arguments that you have, you invoke the corresponding UDAF. Thanks, Yin On Fri, Sep 25, 2015 at 8:07 AM, Ritesh Agrawal < [email protected]> wrote: > Hi all, > > I am trying to learn about UDAF and implemented a simple reservoir sample > UDAF. It's working fine. However I am not able to figure out what DataType > should I use so that its can deal with all DataTypes (simple and complex). > For instance currently I have defined my input schema as > > def inputSchema = StructType(StructField("id", StringType) :: Nil ) > > > Instead of StringType can I use some other data type that is superclass of > all the DataTypes ? > > Ritesh >
