-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 DELETE and UPDATE to trino-base-jdbc #6993
Comments
There is a PR for DELETE, using a different approach than outlined here. |
I think we can also leverage same approach as in #6287 for UPDATE. Today I am not sure if support for arbitrary UPDATE and DELETE is very needed for JDBC connectors. WDYT? |
I was searching here for UPDATE (forgot to search for DELETE) my apologies. I can't comment on whether it's generally important. Here we were debating whether we can use Trino as our (almost) general SQL frontend - since we have OLTP type data source (Oracle, PostgreSQL, Phoenix, etc) as well as OLAP (Hive and Iceberg tables). While there are other considerations as well, one counter point was that we cannot issue DELETEs or UPDATEs to our OLTP data sources. I'd argue it's just as important as adding DELETE and UPDATE to the Hive connector. If #6287 is easier to do, let's do it that way. I was going by the added UpdatableDataSource and wanted to see how to leverage that. |
|
@lhofhansl Since DELETE is merged, would you be willing to work on |
per trino/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DefaultJdbcMetadata.java Line 680 in 825e6d8
I think it would be valuable to first extend DELETE to support cases when the delete predicate cannot be fully pushed down (eg LIKE, subquery, a function call, something requiring coercions, etc.) |
UPDATE to trino-base-jdbc Still not supported,I think its a common use function @lhofhansl |
There is work already in progress for UPDATE, see #16445 CC: @vlad-lyutenko |
Looking at the code involves something like the following:
Once it's added to trino-base-jdbc it can be add the the Postgres, MySQL, Phoenix, etc, connectors.
Note sure I'll find time to do this, filing in case someones else is interested. :)
Relates to #5275
The text was updated successfully, but these errors were encountered: