In HiveQL, you should be able to express this as: SELECT ... FROM table GROUP BY m['SomeKey']
On Sat, Apr 4, 2015 at 5:25 PM, Justin Yip <yipjus...@prediction.io> wrote: > Hello, > > I have a case class like this: > > case class A( > m: Map[Long, Long], > ... > ) > > and constructed a DataFrame from Seq[A]. > > I would like to perform a groupBy on A.m("SomeKey"). I can implement a > UDF, create a new Column then invoke a groupBy on the new Column. But is it > the idiomatic way of doing such operation? > > Can't find much info about operating MapType on Column in the doc. > > Thanks ahead! > > Justin >