Open nolanbconaway opened 9 months ago
I think we could transform simple MERGE statements to INSERT ON CONFLICT, ie: when the clause is when not matched
or when matched
like in your example.
But if there is a case predicate, eg: when not matched and a < 100
I can't see how to express it in terms of INSERT ON CONFLICT. Likewise for the DELETE action.
We'd probably have to transform this into multiple individual INSERT, UPDATE and DELETE statements.
I have the same issue, would be great to support MERGE statements.
@sbouclier do you have an example of the MERGE statements you'd like support for?
Hi! Thanks for this awesome tool.
I'm (finally) writing some unit tests for some internal libraries, in which one of the main functions is completing an upsert using the merge feature.
And i get an error like:
duckdb does not have a MERGE statement (it uses insert-on-conflict), which i presume is the source of this issue. Have you run into this/do you know how you might approach a solution?
For now I am writing out the same merge using INSERT ON CONFLICT depending on the test env, but would be charmed for this to "just work". :)
Info: