Sunday, January 7, 2024

java.lang.NoSuchMethodError: org.apache.spark.sql.AnalysisException.(Ljava/lang/String;Lscala/Option;Lscala/Option

"""
PYSPARK
Py4JJavaError: An error occurred while calling o560.save.
: java.lang.NoSuchMethodError: org.apache.spark.sql.AnalysisException.<init>(Ljava/lang/String;Lscala/Option;Lscala/Option;Lscala/Option;Lscala/Option;)V
at org.apac
"""
df.withColumn("key",lit(1)) #Wrong
#lit should be String
df.withColumn("key",lit("a")) #COrrect
view raw error.py hosted with ❤ by GitHub

No comments:

Post a Comment