Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.11.1 #278

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
Loading