Guest User

Untitled

a guest
Oct 18th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. case class Measurement(nb:Long,x:Double)
  2.  
  3. ds.map{m => (m,sum($"x").over(Window.orderBy($"nb"))}
  4.  
  5. ds.withColumn("cumsum",sum($"x").over(Window.orderBy($"nb")))
  6.  
  7. ds.withColumn("cumsum",sum($"x").over(Window.orderBy($"nb"))).as[(Measurement,Column)]
Add Comment
Please, Sign In to add comment