Skip to content

Commit

Permalink
Modified value for pyspark value on validation
Browse files Browse the repository at this point in the history
  • Loading branch information
canimus committed Jul 14, 2024
1 parent 0c11e78 commit 5e2bbae
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cuallee/pyspark_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,11 +801,10 @@ def summary(check: Check, dataframe: DataFrame) -> DataFrame:
spark = SparkSession.builder.getOrCreate()

def _value(x):
"""Removes verbosity for Callable values"""
if x.options and isinstance(x.options, dict):
return x.options.get("custom_value", "f(x)")
elif isinstance(x.value, Callable):
return "f(x)"
"""Removes verbosity for Callable values"""
if isinstance(x.value, Callable):
if x.options and isinstance(x.options, dict):
return x.options.get("custom_value", "f(x)")
else:
return str(x.value)

Expand Down

0 comments on commit 5e2bbae

Please sign in to comment.