Skip to content

Commit

Permalink
Merge pull request #377 from DataRecce/feature/drc-523-row-count-and-…
Browse files Browse the repository at this point in the history
…schema-diff-with-node-selector-should-support-messsage

[Chore] Refine summary mismatched nodes content
  • Loading branch information
wcchang1115 authored Jul 4, 2024
2 parents f63b5b2 + 3b04db6 commit d6680b2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions recce/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,11 @@ def sort_changed_first(n):

nodes = sorted(check.related_nodes, key=sort_changed_first)

display_nodes = nodes[:limit]
return ', '.join(display_nodes) + (f', and {len(nodes) - limit} more' if len(nodes) > limit else '')
if len(nodes) <= limit:
return ', '.join(nodes)

display_nodes = nodes[:limit - 1]
return ', '.join(display_nodes) + f', and {len(nodes) - len(display_nodes)} more nodes'


def generate_check_summary(base_lineage, curr_lineage) -> (List[CheckSummary], Dict[str, int]):
Expand Down

0 comments on commit d6680b2

Please sign in to comment.