Subject: Window function range between


Hi,

This works for me

scala> val wSpec3 =
Window.partitionBy('priceInfo.getItem("ticker")).orderBy('priceInfo.getItem("timeissued").desc).rangeBetween(0,5)
wSpec3: org.apache.spark.sql.expressions.WindowSpec =
org.apache.spark.sql.expressions.WindowSpec@f308c09

HTH,

Is the date format correct. It is better to refer to date column as

val window = Window.orderBy(*'date*).rangeBetween(0,5) 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 Mon, 25 Mar 2019 at 18:41, Kumar sp <[EMAIL PROTECTED]> wrote: