Re: Is there a way to do conditional group by in spark 2.1.1?

2017-06-10 Thread vaquar khan
>> >> >> On Sat, Jun 3, 2017 at 6:26 PM -0400, "upendra 1991" < >> upendra1...@yahoo.com.invalid> wrote: >> >> Use a function >>> >>> Sent from Yahoo Mail on Android >>> <https://overview.mail.yahoo.com/mobile/?.sr

Re: Is there a way to do conditional group by in spark 2.1.1?

2017-06-04 Thread Guy Cohen
Yahoo Mail on Android >> <https://overview.mail.yahoo.com/mobile/?.src=Android> >> >> On Sat, Jun 3, 2017 at 5:01 PM, kant kodali >> wrote: >> Hi All, >> >> Is there a way to do conditional group by in spark 2.1.1? other words, I >> want to do something like this >> >> if (field1 == "foo") { >>df.groupBy(field1) >> } else if (field2 == "bar") >> df.groupBy(field2) >> >> Thanks >> >>

Re: Is there a way to do conditional group by in spark 2.1.1?

2017-06-03 Thread Bryan Jeffrey
3, 2017 at 5:01 PM, kant kodali wrote: Hi All, Is there a way to do conditional group by in spark 2.1.1? other words, I want to do something like this if (field1 == "foo") {        df.groupBy(field1) } else if (field2 == "bar")      df.groupBy(field2) Thanks

Re: Is there a way to do conditional group by in spark 2.1.1?

2017-06-03 Thread upendra 1991
Use a function Sent from Yahoo Mail on Android On Sat, Jun 3, 2017 at 5:01 PM, kant kodali wrote: Hi All, Is there a way to do conditional group by in spark 2.1.1? other words, I want to do something like this if (field1 == "foo") {        df.groupBy(field1) } else if (fiel

Is there a way to do conditional group by in spark 2.1.1?

2017-06-03 Thread kant kodali
Hi All, Is there a way to do conditional group by in spark 2.1.1? other words, I want to do something like this if (field1 == "foo") { df.groupBy(field1) } else if (field2 == "bar") df.groupBy(field2) Thanks