{"record":{"id":"430a7007047c3acd","repo":"prestodb/presto","slug":"not-supported-430a70","errorCode":"NOT_SUPPORTED","errorMessage":"Temporary table cannot be created in catalog \"%s\": %s","messagePattern":"Temporary table cannot be created in catalog \"(.+?)\": (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/sql/planner/BasePlanFragmenter.java","lineNumber":486,"sourceCode":"                session, connectorId.getCatalogName(), exchange.getOutputVariables(), partitioningVariableAssignments.getConstants().keySet());\n        List<VariableReferenceExpression> partitioningVariables = partitioningVariableAssignments.getVariables();\n        List<String> partitionColumns = partitioningVariables.stream()\n                .map(variable -> variableToColumnMap.get(variable).getName())\n                .collect(toImmutableList());\n        PartitioningMetadata partitioningMetadata = new PartitioningMetadata(partitioningHandle, partitionColumns);\n\n        TableHandle temporaryTableHandle;\n\n        try {\n            temporaryTableHandle = metadata.createTemporaryTable(\n                    session,\n                    connectorId.getCatalogName(),\n                    ImmutableList.copyOf(variableToColumnMap.values()),\n                    Optional.of(partitioningMetadata));\n        }\n        catch (PrestoException e) {\n            if (e.getErrorCode().equals(NOT_SUPPORTED.toErrorCode())) {\n                throw new PrestoException(\n                        NOT_SUPPORTED,\n                        format(\"Temporary table cannot be created in catalog \\\"%s\\\": %s\", connectorId.getCatalogName(), e.getMessage()),\n                        e);\n            }\n            throw e;\n        }\n\n        TableScanNode scan = createTemporaryTableScan(\n                metadata,\n                session,\n                idAllocator,\n                exchange.getSourceLocation(),\n                temporaryTableHandle,\n                exchange.getOutputVariables(),\n                variableToColumnMap,\n                Optional.of(partitioningMetadata),\n                Optional.empty());\n","sourceCodeStart":468,"sourceCodeEnd":504,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/sql/planner/BasePlanFragmenter.java#L468-L504","documentation":"When the planner needs to materialize an exchange as a temporary table in a remote catalog, it calls the connector's metadata createTemporaryTable. If the connector rejects this with NOT_SUPPORTED, Presto rethrows a clearer message naming the catalog. The storage the query runs on does not support temporary/staging tables needed by this plan shape.","triggerScenarios":"A distributed query whose plan fragment requires remote materialization (e.g. certain spooling/aggregation or external-s exchange strategies) against a catalog whose connector lacks temporary-table support (or lacks a configured temp storage location).","commonSituations":"Running queries against connectors like Redis, Kafka, or custom connectors with no writable temp storage; missing session/catalog configuration for a temporary table schema; enabling exchange materialization features (e.g. fault-tolerant execution or spooling operators) on catalogs that cannot host temp tables.","solutions":["Point the query at a catalog that supports temporary tables (e.g. Hive/Iceberg-backed) for the materialized exchange","Configure the connector's temporary/staging storage (e.g. temp table schema or spooling storage location) per connector docs","Disable the plan feature requiring exchange materialization (e.g. turn off spooling operator or adjust query-type/engine settings)"],"exampleFix":"// session example\n// before\nSET SESSION spooling_operator_enabled = true; -- against a catalog without temp table support\n// after\nSET SESSION spooling_operator_enabled = false;\n-- or route the query to a catalog with temp storage configured","handlingStrategy":"try-catch","validationCode":"// Before relying on remote materialization, verify connector temp-table support\ntry {\n    metadata.createTemporaryTable(session, catalogName, ...);\n} catch (PrestoException e) {\n    if (e.getErrorCode().equals(NOT_SUPPORTED.toErrorCode())) {\n        // fall back to a different catalog or disable materialization\n    }\n}","typeGuard":null,"tryCatchPattern":"try { runQuery(sql); } catch (PrestoException e) { if (e.getErrorCode().equals(NOT_SUPPORTED.toErrorCode()) && e.getMessage().contains(\"Temporary table cannot be created\")) { /* re-target to a catalog with temp storage or disable spooling */ } else throw e; }","preventionTips":["Verify the target connector supports temporary tables before enabling features needing materialized exchanges","Configure temp/staging storage per connector","Keep spooling/exchange-materialization features off for connectors without writable storage"],"tags":["planner","connector","temporary-table"],"backgroundTag":"connector-unsupported-operation","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"}