Re: Spark dataframe, UserDefinedAggregateFunction(UDAF) help!!

2017-03-23 Thread Georg Heiler
3, 2017 8:18 PM > *To:* user > *Subject:* Spark dataframe, UserDefinedAggregateFunction(UDAF) help!! > > This is my input data. The UDAF needs to aggregate the goals for a team > and return a map that gives the count for every goal in the team. > I am getting the following error &g

Re: Spark dataframe, UserDefinedAggregateFunction(UDAF) help!!

2017-03-23 Thread shyla deshpande
--- > *From:* shyla deshpande > *Sent:* Thursday, March 23, 2017 8:18 PM > *To:* user > *Subject:* Spark dataframe, UserDefinedAggregateFunction(UDAF) help!! > > This is my input data. The UDAF needs to aggregate the goals for a team > and return a map that

Re: Spark dataframe, UserDefinedAggregateFunction(UDAF) help!!

2017-03-23 Thread Yong Zhang
Change: val arrayinput = input.getAs[Array[String]](0) to: val arrayinput = input.getAs[Seq[String]](0) Yong From: shyla deshpande Sent: Thursday, March 23, 2017 8:18 PM To: user Subject: Spark dataframe, UserDefinedAggregateFunction(UDAF) help!! This is

Spark dataframe, UserDefinedAggregateFunction(UDAF) help!!

2017-03-23 Thread shyla deshpande
This is my input data. The UDAF needs to aggregate the goals for a team and return a map that gives the count for every goal in the team. I am getting the following error java.lang.ClassCastException: scala.collection.mutable.WrappedArray$ofRef cannot be cast to [Ljava.lang.String; at com.whil.co