Use stream
method as follows:
df.filter(col("something").isin(selected.stream().toArray(String[]::new))))
More Related Contents:
- How to handle this scenario in spark? [closed]
- How to do aggregate functions, may columns and extract back
- How to flatten a struct in a Spark dataframe?
- How to create SparkSession with Hive support (fails with “Hive classes are not found”)?
- Spark sql how to explode without losing null values
- Spark Strutured Streaming automatically converts timestamp to local time
- spark broadcast variable Map giving null value
- How to set timezone to UTC in Apache Spark?
- Change output filename prefix for DataFrame.write()
- How do I call a UDF on a Spark DataFrame using JAVA?
- Retain keys with null values while writing JSON in spark
- Why does SparkSession execute twice for one action?
- Resolving dependency problems in Apache Spark
- Add JAR files to a Spark job – spark-submit
- Spark: How to map Python with Scala or Java User Defined Functions?
- Pyspark: Exception: Java gateway process exited before sending the driver its port number
- Spark Error – Unsupported class file major version
- How can I update a broadcast variable in spark streaming?
- Apache Spark – foreach Vs foreachPartition When to use What?
- Timestamp convert [duplicate]
- Matrix Multiplication in Apache Spark [closed]
- What are the Spark transformations that causes a Shuffle?
- PySpark: java.lang.OutofMemoryError: Java heap space
- TaskSchedulerImpl: Initial job has not accepted any resources;
- java.lang.NoClassDefFoundError: org/apache/spark/Logging
- How can I force Spark to execute code?
- Reading data from Azure Blob with Spark
- Difference between SparkContext, JavaSparkContext, SQLContext, and SparkSession?
- Spark: get number of cluster cores programmatically
- Running custom Java class in PySpark