{"record":{"id":"ba416d65e56cc0c7","repo":"prestodb/presto","slug":"not-supported-ba416d","errorCode":"NOT_SUPPORTED","errorMessage":"Unsupported column type: ","messagePattern":"Unsupported column type: ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-clickhouse/src/main/java/com/facebook/presto/plugin/clickhouse/ClickHouseColumnHandle.java","lineNumber":236,"sourceCode":"        if (type.equals(DOUBLE)) {\n            return new ClickHouseTypeHandle(Types.DOUBLE, Optional.of(\"double precision\"), 32, 4, Optional.empty(), Optional.empty());\n        }\n        if (type instanceof CharType || type instanceof VarcharType) {\n            return new ClickHouseTypeHandle(Types.VARCHAR, Optional.of(\"String\"), 100, 0, Optional.empty(), Optional.empty());\n        }\n        if (type instanceof VarbinaryType) {\n            return new ClickHouseTypeHandle(Types.VARCHAR, Optional.of(\"String\"), 2000, 0, Optional.empty(), Optional.empty());\n        }\n        if (type == DATE) {\n            return new ClickHouseTypeHandle(Types.DATE, Optional.of(\"date\"), 8, 0, Optional.empty(), Optional.empty());\n        }\n        if (type == TIME) {\n            return new ClickHouseTypeHandle(Types.TIME, Optional.of(\"time\"), 4, 0, Optional.empty(), Optional.empty());\n        }\n        if (type == TIMESTAMP) {\n            return new ClickHouseTypeHandle(Types.TIMESTAMP, Optional.of(\"timestamp\"), 8, 0, Optional.empty(), Optional.empty());\n        }\n        throw new PrestoException(NOT_SUPPORTED, \"Unsupported column type: \" + type);\n    }\n}\n","sourceCodeStart":218,"sourceCodeEnd":239,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-clickhouse/src/main/java/com/facebook/presto/plugin/clickhouse/ClickHouseColumnHandle.java#L218-L239","documentation":"ClickHouseColumnHandle.toMappingDefaultJdbcHandle() converts a Presto column type into the default JDBC type handle used when falling back to the base JDBC connector. Types with no mapping (e.g. TIME as shown, or other exotic types) throw PrestoException NOT_SUPPORTED.","triggerScenarios":"Reading a ClickHouse table whose column maps to a Presto type the connector cannot translate to a default JDBC handle, typically during column handle conversion for reads when a ClickHouse-specific type handle is missing.","commonSituations":"Tables containing TIME-like columns; connector fallback paths triggered by unusual ClickHouse types; schema changed upstream after table creation.","solutions":["Alter the ClickHouse table column to a supported type (Date/DateTime/String/numeric)","Cast the column in your SELECT so it maps to a supported Presto type","Exclude the unsupported column from the query","Upgrade the plugin to a version that handles the type"],"exampleFix":"// before\nSELECT my_time_col FROM ch.db.t;\n// after\nSELECT CAST(my_time_col AS TIMESTAMP) AS my_time_col FROM ch.db.t;","handlingStrategy":"type-guard","validationCode":"for (Column c : tableColumns) {\n    if (c.getType().equals(TIME) || c.getType() instanceof TimeWithTimeZoneType) {\n        throw new IllegalArgumentException(\"Column \" + c.getName() + \" type unsupported for ClickHouse reads: \" + c.getType());\n    }\n}","typeGuard":"boolean isClickHouseReadable(Type t) {\n    return !(t.equals(TIME) || t.equals(TIMESTAMP) && isKnownUnsupported(t))\n        || isSupportedClickHouseType(t);\n}","tryCatchPattern":"try {\n    return toMappingDefaultJdbcHandle(type);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getCode() == NOT_SUPPORTED.toErrorCode().getCode()) {\n        return Optional.empty(); // skip/Exclude this column\n    }\n    throw e;\n}","preventionTips":["Avoid TIME-family columns in ClickHouse tables","Cast unsupported columns in the SELECT list","Keep plugin and server versions aligned","Diff source vs ClickHouse schemas after upstream changes"],"tags":["jdbc","type-mapping","not-supported","column-handle"],"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"}