-
Notifications
You must be signed in to change notification settings - Fork 127
feat: support merge/update on duplicate rows #646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b50be01 to
49cc7a3
Compare
pdet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Cody, long time no see! Thanks for the PR, and for being upfront wrt AI usage, I confess I'm extremely bear-ish of LLMs coding C++, but since this is somewhat localized I gave it a go reviewing it :-)
Could we also add inlined tests? I think these should probably be fine since they are executed in the catalog, I'm wondering what should happen if the catalog does not support multiple updates in the same row though, maybe that's not a problem since the catalog would just fail? I guess PG and SQLite can also resolve this.
I've been seeing you :) just lurking around the DuckLake repo a lot; I'm a huge fan and it's really cool to have something so relatively simple driving real use cases for Ascend's customers too
np! yeah I figured this was well-scoped enough and would be a cool experiment for me. and this error is really annoying for us, but not annoying enough that we've worked around it. + given how extensively we use DuckLake, always good to contribute back. I will of course not be spamming this repo w/ AI slop and will try to be a good OSS citizen on any future contributions as well. probably should have caught the hash and vector library code 🤷
added an inlining test -- my understanding is the data is de-duplicated before it hits the catalog for the inlined data tables, but I could be wrong on that thanks for the review! again really love all the work you and the DuckDB folks are doing for our industry |
Absolutely, I think for this case, it is perfectly fine! Thanks for the initiative!
Thanks for doing the changes so quickly! I think it looks good! One last request, could you retarget it to v1.4? |
|
done! that did explode the diff and resulted in a conflict; let me know if I should to do anything else |
|
Hi @lostmygithubaccount, with retarget to v1.4 it's not simply changing the branch, since that would also get all the changes in main to v1.4, not only the ones related to your PR. You might have to cherry pick your commits. |
da70bc1 to
76a6964
Compare
76a6964 to
d6df0d5
Compare
|
makes sense -- done and just squashed the 3 down into 1 commit |
|
Thanks, LGTM! :-) |
resolves #645
"AI" use disclosure: this code was entirely written using Claude Code on Opus 4.5, with a lot of direction. I've run the tests, including on the
repro.sqlin the linked discussion. if this is more work than it's worth, feel free to discard and apologies! I'm not comfortable writing C++ myself but would love to see this fixedkeeps the first row if there are duplicates on merge/update