From e24d58d43416abd89493c69a7346de13e0c391c4 Mon Sep 17 00:00:00 2001 From: Erez Shinan Date: Mon, 14 Nov 2022 12:50:26 -0300 Subject: [PATCH] Fix for issue #286 --- data_diff/__main__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/data_diff/__main__.py b/data_diff/__main__.py index 0ad6de11..48eaae57 100644 --- a/data_diff/__main__.py +++ b/data_diff/__main__.py @@ -343,10 +343,11 @@ def _main( expanded_columns = set() for c in columns: - match = set(match_like(c, mutual)) + cc = c if case_sensitive else c.lower() + match = set(match_like(cc, mutual)) if not match: - m1 = None if any(match_like(c, schema1.keys())) else f"{db1}/{table1}" - m2 = None if any(match_like(c, schema2.keys())) else f"{db2}/{table2}" + m1 = None if any(match_like(cc, schema1.keys())) else f"{db1}/{table1}" + m2 = None if any(match_like(cc, schema2.keys())) else f"{db2}/{table2}" not_matched = ", ".join(m for m in [m1, m2] if m) raise ValueError(f"Column '{c}' not found in: {not_matched}")