Spark Dataframe : Accessing next record in map function
<p>I have a DF with a timestamp column, sort by this column. Is there any way to do this : for each record, acces the next record to calculate time diffrence between the two lines? I don't think this is possible in a map function, since the two lines may be processed on different nodes.</p>

<p>Thank you!</p>