Skip to content

Commit 23df21f

Browse files
authored
Merge pull request #15 from iGera97/master
Fix client.py
2 parents 5f500ca + 71f46c0 commit 23df21f

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
@@ -125,7 +125,7 @@ def rough_counts_estimator(self, query: str) -> int:
125125
# Query of the argument should be "DERIVED" because it is sub query of explain select.
126126
# Count query should be "PRIMARY" or "SIMPLE" because it is not sub query.
127127
if record["select_type"] in ("PRIMARY", "SIMPLE"):
128-
total_number = record["rows"]
128+
total_number = int(record["rows"])
129129
except MySQLConnectorError as e:
130130
raise MySQLClientError(
131131
f"Failed to execute query: {count_query}, Raise exception: {e}"

0 commit comments

Comments
 (0)