{"record":{"id":"2c48b848847b679c","repo":"prestodb/presto","slug":"not-supported-2c48b8","errorCode":"NOT_SUPPORTED","errorMessage":"Unsupported type ","messagePattern":"Unsupported type ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-accumulo/src/main/java/com/facebook/presto/accumulo/model/Field.java","lineNumber":118,"sourceCode":"            this.value = field.getShort();\n        }\n        else if (type.equals(TIME)) {\n            this.value = new Time(field.getTime().getTime());\n        }\n        else if (type.equals(TIMESTAMP)) {\n            this.value = new Timestamp(field.getTimestamp().getTime());\n        }\n        else if (type.equals(TINYINT)) {\n            this.value = field.getByte();\n        }\n        else if (type.equals(VARBINARY)) {\n            this.value = Arrays.copyOf(field.getVarbinary(), field.getVarbinary().length);\n        }\n        else if (type.equals(VARCHAR)) {\n            this.value = field.getVarchar();\n        }\n        else {\n            throw new PrestoException(NOT_SUPPORTED, \"Unsupported type \" + type);\n        }\n    }\n\n    public Type getType()\n    {\n        return type;\n    }\n\n    public Block getArray()\n    {\n        return (Block) value;\n    }\n\n    public Long getLong()\n    {\n        return (Long) value;\n    }\n","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-accumulo/src/main/java/com/facebook/presto/accumulo/model/Field.java#L100-L136","documentation":"Field's copy constructor maps a source field's Presto Type to an internal typed value (Boolean, Long, Double, VARBINARY byte copy, VARCHAR string, etc.). If the Type is none of the supported kinds, it throws PrestoException NOT_SUPPORTED with the offending type. The accumulo connector simply does not model that Presto type in Field.","triggerScenarios":"Constructing a Field from a value whose Type is an unsupported kind — e.g., TIME, TIMESTAMP, TIME_WITH_TIME_ZONE, JSON, IPADDRESS, or a nested type not handled by the constructor's if/else chain.","commonSituations":"A table column was declared with a type the connector doesn't support (e.g., TIMESTAMP) and a row write/serialization tries to wrap that column value in a Field; a custom connector extension passes exotic types into the accumulo writer; schema changed to a new Presto type not supported by the installed connector version.","solutions":["Change the table schema so the column uses a supported type (BOOLEAN, BIGINT/INTEGER, DOUBLE, VARCHAR, VARBINARY, etc.).","Cast the column to a supported type in the query before writing/reading through the accumulo connector (e.g., CAST(ts AS VARCHAR)).","Upgrade the presto-accumulo connector if a newer version supports the type, or patch Field's constructor to add a mapping.","Check which column/type triggered it from the message suffix and review the DDL for that column."],"exampleFix":"// before: unsupported column type\nCREATE TABLE t (ts TIMESTAMP, v VARCHAR);\n// after: cast to a supported type\nCREATE TABLE t (ts VARCHAR, v VARCHAR); -- or CAST(ts AS VARCHAR) on insert","handlingStrategy":"validation","validationCode":"// check column types against the supported set before writing\nSet<Type> supported = ImmutableSet.of(BOOLEAN, BIGINT, INTEGER, DOUBLE, VARCHAR, VARBINARY);\nfor (ColumnHandle col : columns) {\n    Type t = types.get(col);\n    if (!supported.contains(t)) throw new IllegalArgumentException(\"Unsupported accumulo type: \" + t);\n}","typeGuard":"boolean isFieldTypeSupported(Type t) {\n    return t.equals(BOOLEAN) || t.equals(BIGINT) || t.equals(INTEGER) ||\n           t.equals(DOUBLE) || t instanceof VarcharType || t.equals(VARBINARY);\n}","tryCatchPattern":"try {\n    Field f = new Field(type, source);\n} catch (PrestoException e) {\n    // NOT_SUPPORTED: cast or drop the offending column before retry\n    throw e;\n}","preventionTips":["Restrict accumulo-backed table DDL to the connector's supported types.","Cast unsupported columns (TIMESTAMP, JSON, etc.) to VARCHAR/VARBINARY in queries.","Keep the connector version in sync with the types your schema uses."],"tags":["types","accumulo","not-supported","serialization"],"backgroundTag":"unsupported-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"}