Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Not able to delete or update #45

Open
shawnzhu opened this issue May 4, 2020 · 1 comment
Open

Not able to delete or update #45

shawnzhu opened this issue May 4, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@shawnzhu
Copy link
Contributor

shawnzhu commented May 4, 2020

What happened

Given prestosql cluster configured with this connector to a db2 warehouse:

delete from <catalog_name>.<schema_name>.xxxxxx WHERE dt_month='2020-04'

It reports error information as USER_ERROR:

io.prestosql.spi.PrestoException: This connector does not support updates or deletes
	at io.prestosql.spi.connector.ConnectorMetadata.getUpdateRowIdColumnHandle(ConnectorMetadata.java:451)
	at io.prestosql.metadata.MetadataManager.getUpdateRowIdColumnHandle(MetadataManager.java:816)
	at io.prestosql.sql.planner.QueryPlanner.plan(QueryPlanner.java:266)
	at io.prestosql.sql.planner.LogicalPlanner.createDeletePlan(LogicalPlanner.java:557)
	at io.prestosql.sql.planner.LogicalPlanner.planStatementWithoutOutput(LogicalPlanner.java:243)
	at io.prestosql.sql.planner.LogicalPlanner.planStatement(LogicalPlanner.java:224)
	at io.prestosql.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:190)
	at io.prestosql.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:185)
	at io.prestosql.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:180)
	at io.prestosql.execution.SqlQueryExecution.doPlanQuery(SqlQueryExecution.java:395)
	at io.prestosql.execution.SqlQueryExecution.planQuery(SqlQueryExecution.java:383)
	at io.prestosql.execution.SqlQueryExecution.start(SqlQueryExecution.java:338)
	at io.prestosql.$gen.Presto_331____20200401_203625_2.run(Unknown Source)
	at io.prestosql.execution.SqlQueryManager.createQuery(SqlQueryManager.java:240)
	at io.prestosql.dispatcher.LocalDispatchQuery.lambda$startExecution$7(LocalDispatchQuery.java:132)
	at io.prestosql.$gen.Presto_331____20200401_203625_2.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

Expected result

It should work since it supports updates statement via this connector already.

@shawnzhu shawnzhu added the bug Something isn't working label May 4, 2020
@shawnzhu shawnzhu added enhancement New feature or request and removed bug Something isn't working labels Mar 14, 2021
@shawnzhu
Copy link
Contributor Author

The Update statement is not supported in base JDBC client.
Need to figure out whether the base JDBC client support DELETE statement

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant