multiple join columns, that may have the same name
when the source is a subquery
To do this, I've refactored the way merge works to align with the approach suggested here, ie:
use a single merge_candidates temporary table to map rows to mutation operations (delete, update, insert)
separate candidate table creation, mutation operations (delete, update, insert), and counts into separate functions, rather than co-mingling this functionality, for better readability
use join columns rather than rowids, and avoid using a transaction because duckdb doesn't support nested transactions so the current implementation will error if an existing transaction is active
Supports MERGE with
To do this, I've refactored the way merge works to align with the approach suggested here, ie:
merge_candidates
temporary table to map rows to mutation operations (delete, update, insert)resolves #24