rm WIP null_level
@@ -55,27 +55,17 @@ def distance_function_level(
return ComparisonLevel(level_dict, sql_dialect=_mutable_params["dialect"])
-def null_level(col_name, array=False) -> ComparisonLevel:
+def null_level(col_name) -> ComparisonLevel:
"""Represents comparisons where one or both sides of the comparison
contains null values so the similarity cannot be evaluated.
-
Assumed to have a partial match weight of zero (null effect on overall match weight)
-
Args:
col_name (str): Input column name
- array (bool): If true, the comparison also checks if the array len is 0.
-
Returns:
- ComparisonLevel: Comparison level for null comparisons. Wherever a null is
- found, the system will remove them from the classification checks.
+ ComparisonLevel: Comparison level
"""
col = InputColumn(col_name, sql_dialect=_mutable_params["dialect"])
-
- sql_cond = f"{col.name_l()} IS NULL OR {col.name_r()} IS NULL"
- if array:
- sql_cond += f"\nOR (SIZE({col.name_l()}) = 0 OR SIZE({col.name_r()}) = 0)"
-
level_dict = {
"sql_condition": f"{col.name_l()} IS NULL OR {col.name_r()} IS NULL",
"label_for_charts": "Null",
