Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix unit test
Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
  • Loading branch information
HaoXuAI committed Mar 25, 2025
commit 2577fd31aab1b3a5d36e13377c931c831eb3f38f
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def remove_extra_spaces_sql(df, column_name):
sql = f"""
SELECT
age,
regexp_replace({column_name}, '\\s+', ' ') as {column_name}
regexp_replace({column_name}, '\\\\s+', ' ') as {column_name}
FROM {df}
"""
return sql
Expand Down Expand Up @@ -96,7 +96,7 @@ def test_spark_transformation_sql(spark_fixture):
spark_transformation = SparkTransformation(
mode=TransformationMode.SPARK_SQL,
udf=remove_extra_spaces_sql,
udf_string="remove extra spaces",
udf_string="remove extra spaces sql",
)

transformed_df = spark_transformation.transform(df, "name")
Expand Down
Loading