Skip to content
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

Add docs for update statements to JDBC connectors #19263

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

colebow
Copy link
Member

@colebow colebow commented Oct 4, 2023

Description

RN was slightly misleading and connector docs need to mention update support. Knock those both out.

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

@cla-bot cla-bot bot added the cla-signed label Oct 4, 2023
@colebow colebow requested review from mosabua and martint and removed request for mosabua October 4, 2023 16:44
@mosabua mosabua merged commit 96653c5 into trinodb:master Oct 4, 2023
Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all UPDATE queries would work. Same limitation as DELETE applies.

Only UPDATE queries that can actually be "pushed down" are supported hence the release notes mentioned pushdown.

@mosabua
Copy link
Member

mosabua commented Oct 4, 2023

Not all UPDATE queries would work. Same limitation as DELETE applies.

Only UPDATE queries that can actually be "pushed down" are supported hence the release notes mentioned pushdown.

How can we explain that to users... how would you know if a update query can be pushed down or not. We might have to follow up with more details for each connector that explain that but we cant talk about pushdown unless we explain how a user can figure that out from writing a SQL query. I also hope that any error messages are meaningful so that users can tell why some update query works and another one does not.

@github-actions github-actions bot added this to the 428 milestone Oct 4, 2023
@mosabua
Copy link
Member

mosabua commented Oct 5, 2023

Any insights @hashhar ? Looks like the PR from @vlad-lyutenko #16445 has more info. Can @vlad-lyutenko please send a PR to update the docs more .. potentially working with @colebow or @jhlodin .. I can help with review and merge.

@vlad-lyutenko
Copy link
Contributor

Maybe I can describe more detailed about limitation:
we support only constant updates, like : UPDATE nation SET col1 = 1 WHERE col3 = 1;
it means that we can not use any expressions in SET section like UPDATE nation SET col1 = col2 + 2 WHERE col3 = 1;

Also we cannot use AND/OR in predicates like UPDATE nation SET col1 = 1 WHERE col3 = 1 AND col2 = 3;

And most tricky limitation - UPDATE ALL, it means -
if we have table with 3 columns - col1 col2 col3
We cannot execute query which update all 3 columns simultaneously, like this:
UPDATE nation SET col1 = 1, col2=2, col3=3 WHERE col3 = 1;
But we can update 2 or 1 of them like:
UPDATE nation SET col1 = 1, col2=2 WHERE col3 = 1;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants