Skip to content

Conversation

Mytherin
Copy link
Collaborator

COPY FROM DATABASE creates a number of INSERT statements, unified through UNION ALL operators to execute this as a single plan. This PR reworks how these union all statements are created to create a balanced tree instead of a depth-first tree, leading to a much less deep tree. This avoids stack overflows later on when copying databases with many tables.

…pth-first union all tree to avoid stack overflows
@Mytherin Mytherin merged commit 081a748 into duckdb:main Sep 12, 2024
39 checks passed
Mytherin added a commit that referenced this pull request Sep 16, 2024
Follow-up from #13889 - also fix
this in `EXPORT` and unify code
github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Sep 25, 2024
Copy From Database - create a balanced UNION ALL tree instead of a depth-first union all tree to avoid stack overflows (duckdb/duckdb#13889)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Sep 25, 2024
Copy From Database - create a balanced UNION ALL tree instead of a depth-first union all tree to avoid stack overflows (duckdb/duckdb#13889)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
@Mytherin Mytherin deleted the setoprecursion branch October 15, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant