Re: Issue returning Map from UDAF

2017-01-26 Thread Ankur Srivastava
Thank you Takeshi, that was the issue. Thanks Ankur Sent from my iPhone > On Jan 25, 2017, at 9:08 PM, Takeshi Yamamuro wrote: > > Hi, > > Quickly looking around the attached, I found you wrongly passed the dataType > of your aggregator output in line70. > So, you need to at lease return `Map

Re: Issue returning Map from UDAF

2017-01-25 Thread Takeshi Yamamuro
Hi, Quickly looking around the attached, I found you wrongly passed the dataType of your aggregator output in line70. So, you need to at lease return `MapType` instead of `StructType`. The stacktrace you showed explicitly say this type unmatch. // maropu On Thu, Jan 26, 2017 at 12:07 PM, Ankur

Issue returning Map from UDAF

2017-01-25 Thread Ankur Srivastava
Hi, I have a dataset with tuple of ID and Timestamp. I want to do a group by on ID and then create a map with frequency per hour for the ID. Input: 1| 20160106061005 1| 20160106061515 1| 20160106064010 1| 20160106050402 1| 20160106040101 2| 20160106040101 3| 20160106051451 Expected Output: 1|{20