{"record":{"id":"6626b7d764c0899d","repo":"prestodb/presto","slug":"column-label-is-null","errorCode":null,"errorMessage":"Column label is null","messagePattern":"Column label is null","errorType":"exception","errorClass":"SQLException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java","lineNumber":1709,"sourceCode":"        }\n        return columnInfoList.get(index - 1);\n    }\n\n    private Object column(String label)\n            throws SQLException\n    {\n        checkOpen();\n        checkValidRow();\n        Object value = row.get().get(columnIndex(label) - 1);\n        wasNull.set(value == null);\n        return value;\n    }\n\n    private int columnIndex(String label)\n            throws SQLException\n    {\n        if (label == null) {\n            throw new SQLException(\"Column label is null\");\n        }\n        Integer index = fieldMap.get(label.toLowerCase(ENGLISH));\n        if (index == null) {\n            throw new SQLException(\"Invalid column label: \" + label);\n        }\n        return index;\n    }\n\n    private static Number toNumber(Object value)\n            throws SQLException\n    {\n        if (value == null) {\n            return 0;\n        }\n        if (value instanceof Number) {\n            return (Number) value;\n        }\n        if (value instanceof Boolean) {","sourceCodeStart":1691,"sourceCodeEnd":1727,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java#L1691-L1727","documentation":"columnIndex(label) is a validation guard: when a String column label is passed as null it throws this SQLException before consulting the field map. Column lookups by label require a non-null label argument.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java:1709 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-null column label string from the query result","Validate user-supplied column names before calling getXxx(String) methods","Catch SQLException in generic framework code that may pass null labels"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}