{"record":{"id":"7caa5b7d4620d346","repo":"prestodb/presto","slug":"type-s-is-not-supported","errorCode":null,"errorMessage":"Type %s is not supported","messagePattern":"Type (.+?) is not supported","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-redis/src/main/java/com/facebook/presto/redis/RedisRecordCursor.java","lineNumber":241,"sourceCode":"\n    @Override\n    public Slice getSlice(int field)\n    {\n        return getFieldValueProvider(field, Slice.class).getSlice();\n    }\n\n    @Override\n    public boolean isNull(int field)\n    {\n        checkArgument(field < columnHandles.size(), \"Invalid field index\");\n        return currentRowValues == null || currentRowValues[field].isNull();\n    }\n\n    @Override\n    public Object getObject(int field)\n    {\n        checkArgument(field < columnHandles.size(), \"Invalid field index\");\n        throw new IllegalArgumentException(format(\"Type %s is not supported\", getType(field)));\n    }\n\n    private FieldValueProvider getFieldValueProvider(int field, Class<?> expectedType)\n    {\n        checkArgument(field < columnHandles.size(), \"Invalid field index\");\n        checkFieldType(field, expectedType);\n        return currentRowValues[field];\n    }\n\n    private void checkFieldType(int field, Class<?> expected)\n    {\n        Class<?> actual = getType(field).getJavaType();\n        checkArgument(actual == expected, \"Expected field %s to be type %s but is %s\", field, expected, actual);\n    }\n\n    @Override\n    public void close()\n    {","sourceCodeStart":223,"sourceCodeEnd":259,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-redis/src/main/java/com/facebook/presto/redis/RedisRecordCursor.java#L223-L259","documentation":"RedisRecordCursor.getObject does not support returning arbitrary typed objects; it validates the field index and then unconditionally throws IllegalArgumentException with the column's type. Object-typed reads are simply not implemented for the Redis connector.","triggerScenarios":"Calling RecordCursor.getObject(field) on a Redis cursor, e.g. from an engine or tool that always reads columns via getObject regardless of declared type.","commonSituations":"Third-party query tools or exporters that call getObject on every column; custom code iterating a Redis RecordCursor directly; connector used with engines that lack specialized typed readers.","solutions":["Read columns using the typed accessors: getLong, getDouble, getSlice, getBoolean, isNull instead of getObject","Fix the calling tool/code to respect the column's declared type","Avoid object-typed columns (row/map/array) in Redis connector table definitions"],"exampleFix":"// before\nObject v = cursor.getObject(field);\n// after\nlong v = cursor.getLong(field); // or getSlice/getDouble per column type","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"boolean supportsGetObject(RecordCursor c, int field) { return false; } // getObject is never supported by RedisRecordCursor","tryCatchPattern":"try { v = cursor.getObject(field); } catch (IllegalArgumentException e) { v = readTyped(cursor, field, columnType); }","preventionTips":["Never call getObject on Redis cursors; use typed accessors","Respect the column's declared Type in generic reader code","Avoid object-typed columns in Redis connector tables"],"tags":["redis","presto","cursor","unsupported-operation"],"backgroundTag":"unsupported-operation","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"}