I'm using Glue 3.0
data = [("Java", "6241499.16943521594684385382059800664452")]
rdd = spark.sparkContext.parallelize(data)
df = rdd.toDF()
df.show()
df.select(f.col("_2").cast("decimal(15,2)")).show()
I get the following result
+----+--------------------+
| _1| _2|
+----+--------------------+
|Java|6241499.169435215...|
+----+--------------------+
+----+
| _2|
+----+
|null|
+----+
locally with pyspark= "==3.2.1"
there is no issue to cast the string to decimal()
but the Glue
job is not able to do so