{"record":{"id":"221646c17d2244a1","repo":"prestodb/presto","slug":"this-connector-does-not-support-row-update","errorCode":null,"errorMessage":"This connector does not support row update","messagePattern":"This connector does not support row update","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"presto-spi/src/main/java/com/facebook/presto/spi/UpdatablePageSource.java","lineNumber":34,"sourceCode":"import com.facebook.presto.common.Page;\nimport com.facebook.presto.common.block.Block;\nimport io.airlift.slice.Slice;\n\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.concurrent.CompletableFuture;\n\npublic interface UpdatablePageSource\n        extends ConnectorPageSource\n{\n    default void deleteRows(Block rowIds)\n    {\n        throw new UnsupportedOperationException(\"This connector does not support row-level delete\");\n    }\n\n    default void updateRows(Page page, List<Integer> columnValueAndRowIdChannels)\n    {\n        throw new UnsupportedOperationException(\"This connector does not support row update\");\n    }\n\n    CompletableFuture<Collection<Slice>> finish();\n\n    default void abort() {}\n}\n","sourceCodeStart":16,"sourceCodeEnd":41,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-spi/src/main/java/com/facebook/presto/spi/UpdatablePageSource.java#L16-L41","documentation":"UpdatablePageSource.updateRows has a default implementation that throws UnsupportedOperationException(\"This connector does not support row update\"). Connectors that do not implement row-level UPDATE inherit this default, and any UPDATE statement routed to them fails at runtime.","triggerScenarios":"Executing UPDATE <table> SET ... against a connector whose UpdatablePageSource does not override updateRows.","commonSituations":"UPDATE statements against read-mostly connectors; custom connector implemented deleteRows but not updateRows; engine capability detection (applyUpdate returning a handle) inconsistent with page source implementation.","solutions":["Rewrite as INSERT + DELETE within a transaction or materialize the change another way","Implement updateRows in the connector's UpdatablePageSource and expose update capability from ConnectorMetadata.applyUpdate","Route the UPDATE to a storage system that supports in-place updates"],"exampleFix":"// before\n@Override\npublic void updateRows(Page page, List<Integer> channels) {\n    throw new UnsupportedOperationException(\"This connector does not support row update\");\n}\n// after\n@Override\npublic void updateRows(Page page, List<Integer> channels) {\n    myStore.updateRows(page, channels);\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { pageSource.updateRows(page, channels); } catch (UnsupportedOperationException e) { /* rewrite as delete+insert or surface unsupported error to user */ }","preventionTips":["Verify ConnectorMetadata.applyUpdate support before planning UPDATE queries","Implement both deleteRows and updateRows together in custom connectors","Prefer copy-on-write strategies for connectors without in-place updates"],"tags":["spi","unsupported-operation","connector","row-update"],"backgroundTag":"unsupported-operation-connector-capability","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}