prestodb/presto · warning · PrestoException

NOT_SUPPORTED

NOT_SUPPORTED

Error message

Unsupported data type in EXPLAIN (TYPE IO): %s

What it means

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.

Source

Thrown at presto-main-base/src/main/java/com/facebook/presto/sql/planner/planPrinter/IOPlanPrinter.java:585

            }
            if (type instanceof TinyintType || type instanceof SmallintType || type instanceof IntegerType || type instanceof BigintType) {
                return ((Long) value).toString();
            }
            if (type instanceof BooleanType) {
                return ((Boolean) value).toString();
            }
            if (type instanceof TimestampType) {
                TimestampType timestampType = (TimestampType) type;
                long timestampValue = timestampType.toEpochMillis((Long) value);
                return printTimestampWithoutTimeZone(timestampValue);
            }
            if (type instanceof TimestampWithTimeZoneType) {
                return printTimestampWithTimeZone((Long) value);
            }
            if (type instanceof DateType) {
                return printDate(((Long) value).intValue());
            }
            throw new PrestoException(NOT_SUPPORTED, format("Unsupported data type in EXPLAIN (TYPE IO): %s", type.getDisplayName()));
        }

        private Void processChildren(PlanNode node, IOPlanBuilder context)
        {
            for (PlanNode child : node.getSources()) {
                child.accept(this, context);
            }

            return null;
        }
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Cast the predicate value to a supported type (e.g. VARCHAR/INTEGER/TIMESTAMP) so the printer can format it.
  2. Remove the EXPLAIN (TYPE IO) request and use EXPLAIN or EXPLAIN ANALYZE instead.
  3. File a feature request to extend getVarcharValue for the specific type.

Example fix

-- before
EXPLAIN (TYPE IO) SELECT * FROM t WHERE ip_col = IPADDRESS('1.2.3.4');
-- after
EXPLAIN (TYPE IO) SELECT * FROM t WHERE CAST(ip_col AS VARCHAR) = '1.2.3.4';
Defensive patterns

Strategy: fallback

Try / catch

try {
    output = explainIo(sql);
} catch (PrestoException e) {
    if ("NOT_SUPPORTED".equals(e.getErrorCode().getName()) && e.getMessage().startsWith("Unsupported data type in EXPLAIN (TYPE IO)")) {
        output = explainStandard(sql); // fall back to plain EXPLAIN
    } else throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: Presto NOT_SUPPORTED error: what "not supported" means and how to fix it — this error's family across 3 libraries.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/5994756e18474f00. Report an issue: GitHub.