erezsh / reladiff

High-performance diffing of large datasets across databases
https://reladiff.readthedocs.io/en/latest/index.html#
Other
366 stars 9 forks source link

[Python] get_stats_dict() error on empty table #29

Closed alex-mirkin closed 2 months ago

alex-mirkin commented 2 months ago

When comparing MySQL to Snowflake, the get_stats_dict() method produces an error when the MySQL table is empty and allow_empty_tables=True.

row 111 in diff_table.py: table1_count = self.info_tree.info.rowcounts[1] Error: KeyError: 1

Using reladiff 0.5.2 from PyPi, and also latest master.

erezsh commented 2 months ago

Thanks for reporting this! It was happening whenever both tables were empty. I was able to fix the issue, and a working version is now in master.