Skip to content

Commit 71f46c0

Browse files
authored
Update client.py
1 parent 1decc16 commit 71f46c0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

beam_mysql/connector/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def rough_counts_estimator(self, query: str) -> int:
120120
# Query of the argument should be "DERIVED" because it is sub query of explain select.
121121
# Count query should be "PRIMARY" or "SIMPLE" because it is not sub query.
122122
if record["select_type"] in ("PRIMARY", "SIMPLE"):
123-
total_number = record["rows"]
123+
total_number = int(record["rows"])
124124
except MySQLConnectorError as e:
125125
raise MySQLClientError(f"Failed to execute query: {count_query}, Raise exception: {e}")
126126

0 commit comments

Comments
 (0)