ArrayFilter Expression¶
ArrayFilter is a ArrayBasedSimpleHigherOrderFunction with CodegenFallback.
Creating Instance¶
ArrayFilter takes the following to be created:
- Argument Expression
- Function Expression
ArrayFilter is created for the following functions:
Demo¶
Scala¶
import org.apache.spark.sql.Column
val even: (Column => Column) = x => x % 2 === 1
val filter_collect = filter(collect_set("id") as "ids", even) as "evens"