更新时间:2022-12-10 07:47:21
这个怎么样:
myDF.filter("action in (1,2)")
或
import org.apache.spark.sql.functions.lit
myDF.where($"action".in(Seq(1,2).map(lit(_)):_*))
或
import org.apache.spark.sql.functions.lit
myDF.where($"action".in(Seq(lit(1),lit(2)):_*))