{"record":{"id":"cf46fd784463553b","repo":"prestodb/presto","slug":"not-found-cf46fd","errorCode":"NOT_FOUND","errorMessage":"No column with name ","messagePattern":"No column with name ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-accumulo/src/main/java/com/facebook/presto/accumulo/model/RowSchema.java","lineNumber":70,"sourceCode":"                        indexed));\n        return this;\n    }\n\n    public AccumuloColumnHandle getColumn(int i)\n    {\n        checkArgument(i >= 0 && i < columns.size(), \"column index must be non-negative and less than length\");\n        return columns.get(i);\n    }\n\n    public AccumuloColumnHandle getColumn(String name)\n    {\n        for (AccumuloColumnHandle columnHandle : columns) {\n            if (columnHandle.getName().equals(name)) {\n                return columnHandle;\n            }\n        }\n\n        throw new PrestoException(NOT_FOUND, \"No column with name \" + name);\n    }\n\n    public List<AccumuloColumnHandle> getColumns()\n    {\n        return columns;\n    }\n\n    public int getLength()\n    {\n        return columns.size();\n    }\n\n    /**\n     * Creates a new {@link RowSchema} from a list of {@link AccumuloColumnHandle} objects. Does not validate the schema.\n     *\n     * @param columns Column handles\n     * @return Row schema\n     */","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-accumulo/src/main/java/com/facebook/presto/accumulo/model/RowSchema.java#L52-L88","documentation":"RowSchema.getColumn looks up an AccumuloColumnHandle by name among the schema's columns; if no column matches it throws NOT_FOUND with 'No column with name <name>'. It is a lookup failure against the connector's declared table schema, not against live Accumulo data.","triggerScenarios":"Calling getColumn(name) with a name that differs in case/spacing from the declared column handle name, or referencing a column (e.g. row_id, indexed column, serializer-specific field) not registered in the schema; code paths in serializers or index lookups passing a stale column name.","commonSituations":"Connector metadata/table config renamed a column but cached row serializers still use the old name; querying an index or column family configured under a different identifier; case-sensitivity mismatch between SQL and stored column names.","solutions":["Use RowSchema.getColumns() and match names case-insensitively before calling getColumn","Correct the column name in the query/config to exactly match the schema's declared name","Re-create the table metadata so column handles reflect the current names","In forked code, switch getColumn to case-insensitive comparison or return Optional"],"exampleFix":"// before\nAccumuloColumnHandle col = schema.getColumn(colName);\n// after\nAccumuloColumnHandle col = schema.getColumns().stream()\n    .filter(c -> c.getName().equalsIgnoreCase(colName))\n    .findFirst()\n    .orElseThrow(() -> new PrestoException(NOT_FOUND, \"No column with name \" + colName));","handlingStrategy":"validation","validationCode":"Optional<AccumuloColumnHandle> col = schema.getColumns().stream()\n    .filter(c -> c.getName().equals(name))\n    .findFirst();\nif (!col.isPresent()) throw new IllegalArgumentException(\"Unknown column: \" + name);","typeGuard":"static boolean schemaHasColumn(RowSchema schema, String name) {\n    return schema.getColumns().stream().anyMatch(c -> c.getName().equals(name));\n}","tryCatchPattern":"try {\n    AccumuloColumnHandle col = schema.getColumn(name);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getCode() == StandardErrorCode.NOT_FOUND.toErrorCode().getCode()) {\n        log.error(\"Column %s not in schema; available: %s\", name, schema.getColumns());\n    }\n    throw e;\n}","preventionTips":["Copy column names from RowSchema.getColumns() rather than hard-coding strings","Watch for case/whitespace differences between SQL names and stored handles","Keep connector metadata in sync after column renames","Centralize column-name constants shared between writer and reader code"],"tags":["presto","accumulo","lookup-failed","schema","column"],"backgroundTag":"column-not-found","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"}