Hi David

If you need alternative way to do it you can use below:
df.select(expr("stack(2, 1,2,3)"))
Or
df.withColumn('stacked', expr("stack(2, 1,2,3)"))

Thanks
Khalid

On Mon, 14 Jun 2021, 10:14 , <david.szakal...@gmail.com> wrote:

> I noticed that the stack SQL function
> <https://spark.apache.org/docs/latest/api/sql/#stack> is missing from the 
> functions
> API
> <https://spark.apache.org/docs/3.1.2/api/java/org/apache/spark/sql/functions.html>.
> Could we add it?
>

Reply via email to