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

Update typing of TableSegment().count() #293

Merged
merged 1 commit into from
Nov 15, 2022
Merged
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 data_diff/table_segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def relevant_columns(self) -> List[str]:
def _relevant_columns_repr(self) -> List[Expr]:
return [NormalizeAsString(this[c]) for c in self.relevant_columns]

def count(self) -> Tuple[int, int]:
def count(self) -> int:
"""Count how many rows are in the segment, in one pass."""
return self.database.query(self.make_select().select(Count()), int)

Expand Down