Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
+ ") = A.{name})"
)
case_string = (
"( CASE WHEN ("
+ " OR ".join(equal_comparisons)
+ ") THEN {match_success} WHEN ("
+ " OR ".join(known_diff_comparisons)
+ ") THEN {match_known_difference} ELSE {match_failure} END) "
+ "AS {name}, A.{name} AS {name}_base, B.{name} AS {name}_compare"
)
return case_string.format(
name=name,
match_success=MatchType.MATCH.value,
match_known_difference=MatchType.KNOWN_DIFFERENCE.value,
match_failure=MatchType.MISMATCH.value,
)