Skip to content

Instantly share code, notes, and snippets.

@j-thepac
Last active January 7, 2024 04:17
Show Gist options
  • Save j-thepac/43e9eb62c395ba300558a496d82840fa to your computer and use it in GitHub Desktop.
Save j-thepac/43e9eb62c395ba300558a496d82840fa to your computer and use it in GitHub Desktop.
java.lang.NoSuchMethodError: org.apache.spark.sql.AnalysisException.<init>(Ljava/lang/String;Lscala/Option;Lscala/Option;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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment