diff --git a/data_diff/utils.py b/data_diff/utils.py index ef9d36b3..eb71cbb1 100644 --- a/data_diff/utils.py +++ b/data_diff/utils.py @@ -155,10 +155,10 @@ def _jsons_equiv(a: str, b: str): def diffs_are_equiv_jsons(diff: list, json_cols: dict): + overriden_diff_cols = set() if (len(diff) != 2) or ({diff[0][0], diff[1][0]} != {'+', '-'}): - return False + return False, overriden_diff_cols match = True - overriden_diff_cols = set() for i, (col_a, col_b) in enumerate(safezip(diff[0][1][1:], diff[1][1][1:])): # index 0 is extra_columns first elem # we only attempt to parse columns of JSONType, but we still need to check if non-json columns don't match match = col_a == col_b