Description
For the attached csv file, the code below causes the exception "org.codehaus.janino.JaninoRuntimeException: Code of method "(Lorg/apache/spark/sql/catalyst/InternalRow;)Z" of class "org.apache.spark.sql.catalyst.expressions.GeneratedClass$SpecificPredicate" grows beyond 64 KB
Code:
val conf = new SparkConf().setMaster("local[1]") val sqlContext = SparkSession.builder().config(conf).getOrCreate().sqlContext val dataframe = sqlContext .read .format("com.databricks.spark.csv") .load("wide400cols.csv") val filter = (0 to 399) .foldLeft(lit(false))((e, index) => e.or(dataframe.col(dataframe.columns(index)) =!= s"column${index+1}")) val filtered = dataframe.filter(filter) filtered.show(100)