{"record":{"id":"6d97e6fdb0e482f8","repo":"prestodb/presto","slug":"not-supported-6d97e6","errorCode":"NOT_SUPPORTED","errorMessage":"catalog does not support page sink commit: ","messagePattern":"catalog does not support page sink commit: ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-spark-base/src/main/java/com/facebook/presto/spark/execution/AbstractPrestoSparkQueryExecution.java","lineNumber":886,"sourceCode":"        if (writerTarget instanceof ExecutionWriterTarget.DeleteHandle) {\n            connectorId = ((ExecutionWriterTarget.DeleteHandle) writerTarget).getHandle().getConnectorId();\n        }\n        else if (writerTarget instanceof ExecutionWriterTarget.CreateHandle) {\n            connectorId = ((ExecutionWriterTarget.CreateHandle) writerTarget).getHandle().getConnectorId();\n        }\n        else if (writerTarget instanceof ExecutionWriterTarget.InsertHandle) {\n            connectorId = ((ExecutionWriterTarget.InsertHandle) writerTarget).getHandle().getConnectorId();\n        }\n        else if (writerTarget instanceof ExecutionWriterTarget.RefreshMaterializedViewHandle) {\n            connectorId = ((ExecutionWriterTarget.RefreshMaterializedViewHandle) writerTarget).getHandle().getConnectorId();\n        }\n        else {\n            throw new IllegalArgumentException(\"unexpected writer target type: \" + writerTarget.getClass());\n        }\n        verify(connectorId != null, \"connectorId is null\");\n        Set<ConnectorCapabilities> connectorCapabilities = metadata.getConnectorCapabilities(session, connectorId);\n        if (!connectorCapabilities.contains(SUPPORTS_PAGE_SINK_COMMIT)) {\n            throw new PrestoException(NOT_SUPPORTED, \"catalog does not support page sink commit: \" + connectorId);\n        }\n    }\n\n    // Returns RDD for specified fragmented SubPlan\n    // This method ensures that RDD is created only once for a sub-plan, where identity is determined by fragment id\n    // For broadcast RDDs, it returns RDD to be broadcasted.\n    protected synchronized <T extends PrestoSparkTaskOutput> RddAndMore<T> createRddForSubPlan(SubPlan subPlan,\n            TableWriteInfo tableWriteInfo,\n            Optional<Class<?>> outputTypeOptional)\n            throws SparkException, TimeoutException\n    {\n        if (fragmentIdToRdd.containsKey(subPlan.getFragment().getId())) {\n            return fragmentIdToRdd.get(subPlan.getFragment().getId());\n        }\n\n        ImmutableMap.Builder<PlanFragmentId, JavaPairRDD<MutablePartitionId, PrestoSparkMutableRow>> rddInputs = ImmutableMap.builder();\n        ImmutableMap.Builder<PlanFragmentId, Broadcast<?>> broadcastInputs = ImmutableMap.builder();\n        ImmutableList.Builder<PrestoSparkBroadcastDependency<?>> broadcastDependencies = ImmutableList.builder();","sourceCodeStart":868,"sourceCodeEnd":904,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-spark-base/src/main/java/com/facebook/presto/spark/execution/AbstractPrestoSparkQueryExecution.java#L868-L904","documentation":"Thrown when finalizing a query whose writer target requires page-sink commit but the target catalog's connector does not declare the SUPPORTS_PAGE_SINK_COMMIT capability. Presto-on-Spark commits table writes via the page sink commit protocol, so catalogs without that capability cannot be written to through this execution path.","triggerScenarios":"Constructor of AbstractPrestoSparkQueryExecution validates the writer target: metadata.getConnectorCapabilities(session, connectorId) lacks ConnectorCapabilities.SUPPORTS_PAGE_SINK_COMMIT while the plan ends in a page-sink commit writer target.","commonSituations":"Writing to a connector that does not implement the page sink commit protocol (older or third-party connectors); mismatched connector/plugin versions where the capability was renamed or not yet implemented.","solutions":["Use a connector version that declares SUPPORTS_PAGE_SINK_COMMIT for the target catalog","Upgrade/redeploy the connector plugin on the Spark cluster to match the coordinator","Route the write through a catalog/connector that supports page sink commit","If you own the connector, implement and expose the SUPPORTS_PAGE_SINK_COMMIT capability"],"exampleFix":"// connector side, before\nclass MyConnectorMetadata ... // no capabilities declared\n// after\n@Override\npublic Set<ConnectorCapabilities> getCapabilities() {\n    return ImmutableSet.of(SUPPORTS_PAGE_SINK_COMMIT);\n}","handlingStrategy":"validation","validationCode":"Set<ConnectorCapabilities> caps = metadata.getConnectorCapabilities(session, connectorId);\nif (!caps.contains(ConnectorCapabilities.SUPPORTS_PAGE_SINK_COMMIT)) {\n    throw new IllegalStateException(\"catalog \" + connectorId + \" cannot be used as write target here\");\n}","typeGuard":"boolean supportsPageSinkCommit(ConnectorMetadata metadata, ConnectorSession session, CatalogSchemaTableName target) {\n    return metadata.getConnectorCapabilities(session, target.getCatalogName())\n        .contains(ConnectorCapabilities.SUPPORTS_PAGE_SINK_COMMIT);\n}","tryCatchPattern":"try {\n    queryExecution.execute();\n}\ncatch (PrestoException e) {\n    if (NOT_SUPPORTED.toErrorCode().getCode().equals(e.getErrorCode().getCode()) && e.getMessage().startsWith(\"catalog does not support page sink commit\")) {\n        // rewrite query against a supported catalog\n    }\n    throw e;\n}","preventionTips":["Check connector capabilities before planning CTAS/INSERT through Spark execution","Keep connector plugins upgraded in lockstep with the engine","Test write paths against target catalogs in CI","Avoid third-party connectors that lack page sink commit support for write workloads"],"tags":["connector","not-supported","page-sink","commit","spark"],"backgroundTag":"connector-capabilities-missing","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"}