I need the function lead(), but i could not find the right way to call it.
I tried like this, but get an error.
df <- withColumn(df, "next", lead(df$colA, 1))
the error is:
org.apache.spark.sql.AnalysisException: unresolved operatore 'Project ....
I determined the return of lead(df$colA, 1) is a Column of Dataframe.
Any help is appreciated.