Skip to content

Commit

Permalink
Merge pull request #278 from capitalone/develop
Browse files Browse the repository at this point in the history
Release v0.11.1
  • Loading branch information
fdosani authored Mar 12, 2024
2 parents c3244d3 + 973f2cd commit 4119130
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion datacompy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.11.0"
__version__ = "0.11.1"

from datacompy.core import *
from datacompy.fugue import (
Expand Down
36 changes: 24 additions & 12 deletions datacompy/spark.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,18 +722,30 @@ def _print_row_matches_by_column(self, myfile: TextIO) -> None:
for key in self.columns_match_dict
if self.columns_match_dict[key][MatchType.MISMATCH.value]
}
columns_fully_matching = {
key: self.columns_match_dict[key]
for key in self.columns_match_dict
if sum(self.columns_match_dict[key])
== self.columns_match_dict[key][MatchType.MATCH.value]
}
columns_with_any_diffs = {
key: self.columns_match_dict[key]
for key in self.columns_match_dict
if sum(self.columns_match_dict[key])
!= self.columns_match_dict[key][MatchType.MATCH.value]
}

# corner case: when all columns match but no rows match
# issue: #276
try:
columns_fully_matching = {
key: self.columns_match_dict[key]
for key in self.columns_match_dict
if sum(self.columns_match_dict[key])
== self.columns_match_dict[key][MatchType.MATCH.value]
}
except TypeError:
columns_fully_matching = {}

try:
columns_with_any_diffs = {
key: self.columns_match_dict[key]
for key in self.columns_match_dict
if sum(self.columns_match_dict[key])
!= self.columns_match_dict[key][MatchType.MATCH.value]
}
except TypeError:
columns_with_any_diffs = {}
#

base_types = {x[0]: x[1] for x in self.base_df.dtypes}
compare_types = {x[0]: x[1] for x in self.compare_df.dtypes}

Expand Down

0 comments on commit 4119130

Please sign in to comment.