SparkSQL - Lag function?
问题 I see in this DataBricks post, there is support for window functions in SparkSql, in particular I'm trying to use the lag() window function. I have rows of credit card transactions, and I've sorted them, now I want to iterate over the rows, and for each row display the amount of the transaction, and the difference of the current row's amount and the preceding row's amount. Following the DataBricks post, I've come up with this query, but it's throwing an exception at me and I can't quite