{"record":{"id":"feb323835a72eedf","repo":"prestodb/presto","slug":"not-supported-feb323","errorCode":"NOT_SUPPORTED","errorMessage":"Unsupported column type %s","messagePattern":"Unsupported column type (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-tpch/src/main/java/com/facebook/presto/tpch/TpchRecordSet.java","lineNumber":245,"sourceCode":"\n            TupleDomain<ColumnHandle> rowTupleDomain = TupleDomain.fromFixedValues(rowMap);\n\n            return predicate.contains(rowTupleDomain);\n        }\n\n        private Object getPrestoObject(TpchColumn<E> column, Type type)\n        {\n            if (type.getJavaType() == long.class) {\n                return getLong(column);\n            }\n            else if (type.getJavaType() == double.class) {\n                return getDouble(column);\n            }\n            else if (type.getJavaType() == Slice.class) {\n                return getSlice(column);\n            }\n            else {\n                throw new PrestoException(NOT_SUPPORTED, format(\"Unsupported column type %s\", type.getDisplayName()));\n            }\n        }\n\n        private TpchColumn<E> getTpchColumn(int field)\n        {\n            return columns.get(field);\n        }\n    }\n}\n","sourceCodeStart":227,"sourceCodeEnd":255,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-tpch/src/main/java/com/facebook/presto/tpch/TpchRecordSet.java#L227-L255","documentation":"TpchRecordSet$ rowMap converts each TPCH column value to a Presto value based on the column's declared type's Java type (long, double, or Slice). If the column type's Java type is none of these, it throws a PrestoException with code NOT_SUPPORTED. This is a defensive check: the TPCH connector only supports those Java type mappings.","triggerScenarios":"Reading rows from a TPCH table whose column handle type resolves to a Java type other than long.class, double.class, or Slice.class — i.e. a PrestoType mapped in TpchMetadata that rowMap was not written to handle (e.g. boolean, Date/DateTime object types).","commonSituations":"After extending the connector to return new Presto types (e.g. TIMESTAMP/BOOLEAN columns) without updating TpchRecordSet's rowMap; querying a table whose column handles were created with an unexpected type due to a version mismatch.","solutions":["Check the column handle's PrestoType for the offending field and confirm it maps to a supported Java type (long, double, or Slice).","Add a branch in rowMap for the new Java type (e.g. convert to long via getLong, or handle the object type).","Align TpchMetadata type mapping with TpchRecordSet so every mapped type has a corresponding rowMap branch."],"exampleFix":"// before\nelse if (type.getJavaType() == Slice.class) {\n    return getSlice(column);\n}\nelse {\n    throw new PrestoException(NOT_SUPPORTED, format(\"Unsupported column type %s\", type.getDisplayName()));\n}\n// after\nelse if (type.getJavaType() == boolean.class) {\n    return getBoolean(column);\n}\nelse {\n    throw new PrestoException(NOT_SUPPORTED, format(\"Unsupported column type %s\", type.getDisplayName()));\n}","handlingStrategy":"try-catch","validationCode":"for (TpchColumnHandle h : columnHandles) {\n    Type t = h.getColumnType();\n    if (t.getJavaType() != long.class && t.getJavaType() != double.class && t.getJavaType() != Slice.class) {\n        throw new IllegalArgumentException(\"Column type not rowMap-supported: \" + t.getDisplayName());\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    recordSet = new TpchRecordSet<>(...);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getCode() == NOT_SUPPORTED.toErrorCode().getCode()) {\n        // fall back to generic row decoding\n    }\n    throw e;\n}","preventionTips":["Keep TpchMetadata's type mapping and TpchRecordSet's rowMap branches in lockstep; add a test covering every mapped type.","Extend rowMap whenever new Presto types are introduced to the connector.","Avoid hand-crafted column handles with types the record set cannot produce."],"tags":["tpch-connector","not-supported","type-mapping"],"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"}