How to access values in array column?
Since Spark 2.4.0, there is a new function element_at($array_column, $index)
.
See Spark docs
df.where($"col".getItem(2) === lit("2017")).select($"col".getItem(3))
see getItem
from https://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.sql.Column