Add a note on the fix for issue 694
@@ -4,6 +4,15 @@ from sqlglot.dialects import Dialect, Spark
def cast_as_double_edit(self, expression):
+ """
+ Forces floating point numbers to the double class in spark,
+ instead of casting them to decimals.
+
+ This resolves the spark issue where decimals only support precision
+ up to 38 digits.
+
+ More info: https://spark.apache.org/docs/latest/sql-ref-datatypes.html
+ """
datatype = self.sql(expression, "to")
if datatype.lower() == "double":
if expression.this.key == "literal":
