Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Tolerate empty samples & allow custom database schemas #802

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Tolerate column type mismatch, it could be aligned later & better
  • Loading branch information
Sergey Vasilyev committed Dec 15, 2023
commit f1ef90a17d9487fdb9d71ea77e6fd17c0345b004
8 changes: 0 additions & 8 deletions data_diff/hashdiff_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,6 @@ def _validate_and_adjust_columns(self, table1: TableSegment, table2: TableSegmen
if lowest.precision != col2.precision:
table2._schema[c2] = attrs.evolve(col2, precision=lowest.precision)

elif isinstance(col1, ColType_UUID):
if strict and not isinstance(col2, ColType_UUID):
raise TypeError(f"Incompatible types for column '{c1}': {col1} <-> {col2}")

elif isinstance(col1, StringType):
if strict and not isinstance(col2, StringType):
raise TypeError(f"Incompatible types for column '{c1}': {col1} <-> {col2}")

for t in [table1, table2]:
for c in t.relevant_columns:
ctype = t._schema[c]
Expand Down