spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mich Talebzadeh <mich.talebza...@gmail.com>
Subject Re: Windows operation orderBy desc
Date Mon, 01 Aug 2016 14:39:24 GMT
You need to get the position right


val wSpec = Window.partitionBy("col1").orderBy(desc("col2"))

HTH

Dr Mich Talebzadeh



LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
<https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*



http://talebzadehmich.wordpress.com


*Disclaimer:* Use it at your own risk. Any and all responsibility for any
loss, damage or destruction of data or any other property which may arise
from relying on this email's technical content is explicitly disclaimed.
The author will in no case be liable for any monetary damages arising from
such loss, damage or destruction.



On 1 August 2016 at 14:56, Ashok Kumar <ashok34668@yahoo.com.invalid> wrote:

> Hi,
>
> in the following Window spec I want orderBy ("<column>") to be displayed
> in descending order please
>
> val W = Window.partitionBy("col1").orderBy("col2")
>
> If I Do
>
> val W = Window.partitionBy("col1").orderBy("col2".desc)
>
> It throws error
>
> console>:26: error: value desc is not a member of String
>
> How can I achieve that?
>
> Thanking you
>

Mime
View raw message