{"record":{"id":"fd5bf234e5bba72a","repo":"prestodb/presto","slug":"druid-unsupported-type-error","errorCode":"DRUID_UNSUPPORTED_TYPE_ERROR","errorMessage":"Unsupported type: %s","messagePattern":"Unsupported type: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-druid/src/main/java/com/facebook/presto/druid/column/ColumnReader.java","lineNumber":50,"sourceCode":"\n    static ColumnReader createColumnReader(Type type, ColumnValueSelector valueSelector)\n    {\n        if (type == VARCHAR) {\n            return new StringColumnReader(valueSelector);\n        }\n        if (type.equals(DOUBLE)) {\n            return new DoubleColumnReader(valueSelector);\n        }\n        if (type == BIGINT) {\n            return new LongColumnReader(valueSelector);\n        }\n        if (type.equals(REAL)) {\n            return new FloatColumnReader(valueSelector);\n        }\n        if (type == TIMESTAMP) {\n            return new TimestampColumnReader(valueSelector);\n        }\n        throw new PrestoException(DRUID_UNSUPPORTED_TYPE_ERROR, format(\"Unsupported type: %s\", type));\n    }\n}\n","sourceCodeStart":32,"sourceCodeEnd":53,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-druid/src/main/java/com/facebook/presto/druid/column/ColumnReader.java#L32-L53","documentation":"ColumnReader.createColumnReader() maps a Presto/TYPES type to a concrete Druid column reader (e.g. FloatColumnReader for REAL, TimestampColumnReader for TIMESTAMP). If the column's type is not one of the supported Bigint/Varchar/Real/Timestamp variants, it throws DRUID_UNSUPPORTED_TYPE_ERROR because no reader exists to decode values of that type from the segment.","triggerScenarios":"Reading a Druid segment whose column metadata resolves to a type outside the supported set in createColumnReader — e.g. a newly introduced Druid column type, a complex/nested type, or a type mapping regression where the DruidColumnType-to-Type translation yields something other than BIGINT, VARCHAR, REAL, or TIMESTAMP.","commonSituations":"Druid cluster or connector version mismatch: newer Druid segments carry column types the installed Presto connector doesn't recognize; schema changes adding unsupported column kinds; misconfigured type mapping when registering external Druid tables.","solutions":["Check the segment's column type via the Druid coordinator/segment metadata and compare against the types supported by your connector version.","Upgrade Presto to a version whose Druid connector supports the column type in question.","Drop or exclude the unsupported column from the query/table definition (e.g. recreate the external table without that column).","If the type mapping looks wrong, inspect DruidColumnHandle/DruidColumnType conversion code and fix the mapping or file a bug."],"exampleFix":"// before\nColumnReader reader = ColumnReader.createColumnReader(unknownType, valueSelector); // throws Unsupported type\n\n// after (guard before reading)\nif (SUPPORTED_TYPES.contains(type)) {\n    ColumnReader reader = ColumnReader.createColumnReader(type, valueSelector);\n} else {\n    throw new PrestoException(DRUID_UNSUPPORTED_TYPE_ERROR, \"Skip or upgrade connector for type: \" + type);\n}","handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":["druid","column-reader","unsupported-type","segment-reading"],"backgroundTag":"unsupported-column-type","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"}