{"record":{"id":"84908622ef5a9173","repo":"prestodb/presto","slug":"not-supported-849086","errorCode":"NOT_SUPPORTED","errorMessage":"arrays are not (yet?) supported for StringRowSerializer","messagePattern":"arrays are not \\(yet\\?\\) supported for StringRowSerializer","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-accumulo/src/main/java/com/facebook/presto/accumulo/serializers/StringRowSerializer.java","lineNumber":130,"sourceCode":"\n        if (family.equals(ROW_ID_COLUMN) && qualifier.equals(ROW_ID_COLUMN)) {\n            return;\n        }\n\n        value.set(entry.getValue().get());\n        columnValues.put(familyQualifierColumnMap.get(family.toString()).get(qualifier.toString()), value.toString());\n    }\n\n    @Override\n    public boolean isNull(String name)\n    {\n        return columnValues.get(name) == null;\n    }\n\n    @Override\n    public Block getArray(String name, Type type)\n    {\n        throw new PrestoException(NOT_SUPPORTED, \"arrays are not (yet?) supported for StringRowSerializer\");\n    }\n\n    @Override\n    public void setArray(Text text, Type type, Block block)\n    {\n        throw new PrestoException(NOT_SUPPORTED, \"arrays are not (yet?) supported for StringRowSerializer\");\n    }\n\n    @Override\n    public boolean getBoolean(String name)\n    {\n        return Boolean.parseBoolean(getFieldValue(name));\n    }\n\n    @Override\n    public void setBoolean(Text text, Boolean value)\n    {\n        text.set(value.toString().getBytes(UTF_8));","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-accumulo/src/main/java/com/facebook/presto/accumulo/serializers/StringRowSerializer.java#L112-L148","documentation":"StringRowSerializer.getArray is an explicitly unimplemented operation: arrays cannot be represented in this serializer's plain-string value format, so it unconditionally throws NOT_SUPPORTED. Any read path that retrieves an array-typed column from a StringRowSerializer-backed table fails immediately.","triggerScenarios":"Querying or iterating a Row whose schema contains an ARRAY column and calling getArray(name, type) — e.g. during record decode of array-typed columns in a table configured with StringRowSerializer.","commonSituations":"Table schema was extended with an array column after the table was configured to use StringRowSerializer; running connector smoke tests that exercise arrays against string-serialized tables (testArray caller).","solutions":["Re-create or re-serialize the table with LexicoderRowSerializer, which supports arrays","Drop the ARRAY column from the table schema","Avoid selecting array columns in queries against StringRowSerializer tables","Fork and implement getArray by encoding elements into the string format"],"exampleFix":"// before\nthrow new PrestoException(NOT_SUPPORTED, \"arrays are not (yet?) supported for StringRowSerializer\");\n// after\nList<Object> elems = new ArrayList<>();\nfor (int i = 0; i < Types.getArraySize(type); i++) {\n    elems.add(elementValue); // decoded from the string representation\n}\nreturn elementsBlock(elems);","handlingStrategy":"type-guard","validationCode":"if (Types.isArrayType(columnType)) {\n    throw new IllegalArgumentException(\"Column \" + name + \" is an ARRAY; StringRowSerializer cannot read it\");\n}\nBlock b = row.getArray(name, columnType);","typeGuard":"static boolean isStringRowReadable(Type t) {\n    return !Types.isArrayType(t) && !Types.isMapType(t);\n}","tryCatchPattern":"try {\n    return row.getArray(name, type);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getCode() == StandardErrorCode.NOT_SUPPORTED.toErrorCode().getCode()) {\n        return null; // treat array column as absent for string serializer\n    }\n    throw e;\n}","preventionTips":["Never declare ARRAY columns on tables using StringRowSerializer","Guard read paths with Types.isArrayType before calling getArray","Prefer LexicoderRowSerializer when the schema needs collections","Document serializer limitations in table metadata"],"tags":["presto","accumulo","unsupported-feature","array","serializer"],"backgroundTag":"arrays-not-supported","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"}