Skip to content

Commit

Permalink
Avoid division by 1 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilbert09 committed Mar 3, 2025
1 parent d2b7b47 commit f423ce7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _get_table_chunk_size(cursor: psycopg.Cursor, schema: str, table_name: str,
logger.debug(f"_get_table_chunk_size: No results returned. Using DEFAULT_CHUNK_SIZE={DEFAULT_CHUNK_SIZE}")
return DEFAULT_CHUNK_SIZE

row_size_bytes = row[0]
row_size_bytes = row[0] or 1

chunk_size = int(DEFAULT_TABLE_SIZE_BYTES / row_size_bytes)

Expand Down

0 comments on commit f423ce7

Please sign in to comment.