{"record":{"id":"09e1781cc0d1a941","repo":"prestodb/presto","slug":"not-supported-09e178","errorCode":"NOT_SUPPORTED","errorMessage":"Unsupported type: ","messagePattern":"Unsupported type: ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/sql/planner/ExpressionInterpreter.java","lineNumber":1132,"sourceCode":"                    result = LikeFunctions.likePattern(pattern.getSlice(), escape);\n                }\n                else {\n                    result = LikeFunctions.likePattern(pattern.getSlice());\n                }\n\n                likePatternCache.put(node, result);\n            }\n\n            return result;\n        }\n\n        @Override\n        public Object visitCast(Cast node, Object context)\n        {\n            Object value = process(node.getExpression(), context);\n            Type targetType = metadata.getType(parseTypeSignature(node.getType()));\n            if (targetType == null) {\n                throw new PrestoException(NOT_SUPPORTED, \"Unsupported type: \" + node.getType());\n            }\n\n            if (value == null) {\n                return null;\n            }\n\n            Type sourceType = type(node.getExpression());\n            if (value instanceof Expression) {\n                if (targetType.equals(sourceType)) {\n                    return value;\n                }\n\n                return new Cast((Expression) value, node.getType(), node.isSafe(), node.isTypeOnly());\n            }\n\n            if (node.isTypeOnly()) {\n                return value;\n            }","sourceCodeStart":1114,"sourceCodeEnd":1150,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/sql/planner/ExpressionInterpreter.java#L1114-L1150","documentation":"ExpressionInterpreter.evaluateCast throws NOT_SUPPORTED when a CAST's target type string cannot be resolved by the metadata type registry. This happens when the planner evaluates a cast expression whose type name is unknown to the server (e.g. from a stale plan, a plugin/connector mismatch, or an unsupported type name).","triggerScenarios":"Interpreting a Cast expression whose node.getType() does not resolve via metadata.getType(parseTypeSignature(...)) — i.e. constant-folding a plan containing a cast to an unregistered/typo'd type.","commonSituations":"Plans serialized by a different Presto version, custom types from a connector plugin not installed on the coordinator, or hand-built SQL with an invalid type name reaching constant evaluation.","solutions":["Check the type name in the query/plan for typos or unsupported types.","Ensure all connector plugins providing custom types are installed on the coordinator.","Verify the plan was produced by the same Presto version that is executing it."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (metadata.getType(parseTypeSignature(typeName)) == null) { throw new IllegalArgumentException(\"Unknown type: \" + typeName); }","typeGuard":"boolean isKnownType(Metadata metadata, String typeName) { return metadata.getType(parseTypeSignature(typeName)) != null; }","tryCatchPattern":"try { Object v = interpreter.evaluate(...); } catch (PrestoException e) { if (e.getErrorCode().getCode() == StandardErrorCode.NOT_SUPPORTED.toErrorCode().getCode()) { /* fallback path */ } else { throw e; } }","preventionTips":["Validate type names against metadata.getType before building cast expressions","Keep plugins in sync across coordinator and workers","Avoid hand-constructing plans with type strings from external sources"],"tags":["planner","type-system","cast"],"backgroundTag":"unknown-type-cast","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"}