Skip to content

Commit

Permalink
fix off by one
Browse files Browse the repository at this point in the history
  • Loading branch information
haritamar committed Nov 5, 2024
1 parent 9e03f57 commit c441a13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macros/utils/table_operations/insert_rows.sql
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
{% set row_sql = elementary.render_row_to_sql(row, columns) %}
{% set query_with_row = current_query.data + ("," if not loop.first else "") + row_sql %}

{% if query_with_row | length > query_max_size or current_chunk_size.data > chunk_size %}
{% if query_with_row | length > query_max_size or current_chunk_size.data >= chunk_size %}
{% set new_insert_query = base_insert_query + row_sql %}

{# Check if row is too large to fit into an insert query. #}
Expand Down

0 comments on commit c441a13

Please sign in to comment.