-
Notifications
You must be signed in to change notification settings - Fork 164
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
feat: proto change to support WRITE_OP_UPDATE in WriteRel #733
Conversation
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.
Looks good to me. As this is a modification it will require one more approval besides mine.
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.
The site docs describe the input
property for WriteRel
as:
The Rel representing which records we will be operating on (e.g., VALUES for an INSERT, or which records to DELETE, or records and after-image of their values for UPDATE).
I interpreted this to suggest that the input to a WriteRel
contained the new values. If the new values were defined (in the SQL) as expressions then they would be converted to a project expression before the update.
I'd rather not have two ways to do the same thing so if this is the approach we want then can we fix up the site docs? Also, in doing so I think this would become a breaking change.
I suppose another way to frame the question is if the goal is to more closely mimic SQL or more closely mimic the physical plans that execute the update.
Also, would be good to get some verification on the original intent from @curino or @jacques-n (especially if this is in use somewhere)
It's probably worth looking at the SQL that this is supposed to enable.
The existing behavior is a complete replacement. (Essentially delete all existing rows and add this input.). We should strive to only update the rows that are changing if possible. |
Discussed this some on sync call today. I think there are two different patterns we should support. The current one is good if you assume implicit row ids (a physical concept). I suggest we introduce a separate relation which maps more logically to sql. |
I'm going to close this PR as probably not the optimal changes. |
No description provided.