{"record":{"id":"5994756e18474f00","repo":"prestodb/presto","slug":"not-supported-599475","errorCode":"NOT_SUPPORTED","errorMessage":"Unsupported data type in EXPLAIN (TYPE IO): %s","messagePattern":"Unsupported data type in EXPLAIN \\(TYPE IO\\): (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"warning","filePath":"presto-main-base/src/main/java/com/facebook/presto/sql/planner/planPrinter/IOPlanPrinter.java","lineNumber":585,"sourceCode":"            }\n            if (type instanceof TinyintType || type instanceof SmallintType || type instanceof IntegerType || type instanceof BigintType) {\n                return ((Long) value).toString();\n            }\n            if (type instanceof BooleanType) {\n                return ((Boolean) value).toString();\n            }\n            if (type instanceof TimestampType) {\n                TimestampType timestampType = (TimestampType) type;\n                long timestampValue = timestampType.toEpochMillis((Long) value);\n                return printTimestampWithoutTimeZone(timestampValue);\n            }\n            if (type instanceof TimestampWithTimeZoneType) {\n                return printTimestampWithTimeZone((Long) value);\n            }\n            if (type instanceof DateType) {\n                return printDate(((Long) value).intValue());\n            }\n            throw new PrestoException(NOT_SUPPORTED, format(\"Unsupported data type in EXPLAIN (TYPE IO): %s\", type.getDisplayName()));\n        }\n\n        private Void processChildren(PlanNode node, IOPlanBuilder context)\n        {\n            for (PlanNode child : node.getSources()) {\n                child.accept(this, context);\n            }\n\n            return null;\n        }\n    }\n}\n","sourceCodeStart":567,"sourceCodeEnd":598,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/sql/planner/planPrinter/IOPlanPrinter.java#L567-L598","documentation":"IOPlanPrinter renders EXPLAIN (TYPE IO) plans and must print literal domain values to describe IO constraints. getVarcharValue converts a value of a given type to its string form; when the type is not one of the supported printable types (e.g. an unsupported complex type), it throws NOT_SUPPORTED 'Unsupported data type in EXPLAIN (TYPE IO): <type>'. This is a limitation of the IO plan printer, not the query itself.","triggerScenarios":"Running EXPLAIN (TYPE IO) on a query whose scan/filter domain contains a marker value of a type the printer cannot stringify (types other than the handled numeric/char/varchar/timestamp/date families) — reached via parseDomain or formatMarker while building the IO plan.","commonSituations":"Filtering on exotic or nested types (rows, maps, arrays, IP addresses, hyperloglog, etc.) in predicates and then requesting EXPLAIN (TYPE IO); connector-specific types appearing in domain markers.","solutions":["Cast the predicate value to a supported type (e.g. VARCHAR/INTEGER/TIMESTAMP) so the printer can format it.","Remove the EXPLAIN (TYPE IO) request and use EXPLAIN or EXPLAIN ANALYZE instead.","File a feature request to extend getVarcharValue for the specific type."],"exampleFix":"-- before\nEXPLAIN (TYPE IO) SELECT * FROM t WHERE ip_col = IPADDRESS('1.2.3.4');\n-- after\nEXPLAIN (TYPE IO) SELECT * FROM t WHERE CAST(ip_col AS VARCHAR) = '1.2.3.4';","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    output = explainIo(sql);\n} catch (PrestoException e) {\n    if (\"NOT_SUPPORTED\".equals(e.getErrorCode().getName()) && e.getMessage().startsWith(\"Unsupported data type in EXPLAIN (TYPE IO)\")) {\n        output = explainStandard(sql); // fall back to plain EXPLAIN\n    } else throw e;\n}","preventionTips":["Avoid predicates on exotic/complex types when relying on EXPLAIN (TYPE IO)","Cast filter values to printable types (VARCHAR, INTEGER, TIMESTAMP)","Use EXPLAIN or EXPLAIN ANALYZE when the IO printer cannot handle the type"],"tags":["explain","io-plan","type-printing","not-supported"],"backgroundTag":"unsupported-type-in-explain-io","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"}