fix sql transform test syntax
@@ -3,7 +3,7 @@ from splink.sql_transform import (
move_l_r_table_prefix_to_column_suffix,
cast_concat_as_varchar,
)
-from splink.spark.custom_spark_dialect import Dialect
+from splink.spark.custom_spark_dialect import Dialect # noqa 401
def test_move_l_r_table_prefix_to_column_suffix():
@@ -58,8 +58,8 @@ def test_cast_concat_as_varchar():
def test_set_numeric_as_double():
sql = "select cast('a' as double), cast(0.12345 as double)"
transformed_sql = sqlglot.transpile(sql, write="customspark")[0]
- assert transformed_sql == "select 'a'D, 0.12345D"
+ assert transformed_sql == "SELECT aD, 0.12345D"
sql = "select cast('a' as string), cast(0.12345 as double)"
transformed_sql = sqlglot.transpile(sql, write="customspark")[0]
- assert transformed_sql == "select cast('a' as string), 0.12345D"
+ assert transformed_sql == "SELECT CAST('a' AS STRING), 0.12345D"
