{"record":{"id":"9c92e6c7be5900af","repo":"prestodb/presto","slug":"getobject","errorCode":null,"errorMessage":"getObject","messagePattern":"getObject","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java","lineNumber":1095,"sourceCode":"\n    @Override\n    public void moveToCurrentRow()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"moveToCurrentRow\");\n    }\n\n    @Override\n    public Statement getStatement()\n    {\n        return statement;\n    }\n\n    @Override\n    public Object getObject(int columnIndex, Map<String, Class<?>> map)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"getObject\");\n    }\n\n    @Override\n    public Ref getRef(int columnIndex)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"getRef\");\n    }\n\n    @Override\n    public Blob getBlob(int columnIndex)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"getBlob\");\n    }\n\n    @Override\n    public Clob getClob(int columnIndex)","sourceCodeStart":1077,"sourceCodeEnd":1113,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java#L1077-L1113","documentation":"getObject(int, Map<String, Class<?>>) allows custom type mapping of SQL structured/distinct types. Presto does not support custom type maps, so this overload unconditionally throws SQLFeatureNotSupportedException(\"getObject\"). Note the simple getObject(int) / getObject(String) overloads ARE supported.","triggerScenarios":"Calling rs.getObject(col, typeMap) or rs.getObject(colName, typeMap) on a PrestoResultSet, usually to map structured types or force a specific Java class.","commonSituations":"Generic JDBC code that passes a Connection.getTypeMap() to every getObject call; code ported from Oracle/DB2 drivers that use structured types; frameworks using the map overload unconditionally.","solutions":["Use the plain getObject(int) or getObject(String, Class<T>) overload instead and cast/coerce in Java","Pass an empty/default type map path: call getObject(columnIndex) and convert manually","Centralize type conversion in a utility rather than relying on JDBC type maps"],"exampleFix":"// before\nObject v = rs.getObject(3, conn.getTypeMap());\n// after\nObject v = rs.getObject(3);\nBigDecimal d = (v instanceof BigDecimal)\n        ? (BigDecimal) v\n        : new BigDecimal(v.toString());","handlingStrategy":"fallback","validationCode":"// avoid the type-map overload; use the supported overload directly\nObject v = rs.getObject(columnIndex);","typeGuard":null,"tryCatchPattern":"try {\n    return rs.getObject(i, typeMap);\n} catch (SQLFeatureNotSupportedException e) {\n    return convert(rs.getObject(i), targetType); // manual conversion\n}","preventionTips":["Use getObject(int) or getObject(String, Class<T>) overloads","Do not pass Connection.getTypeMap() to Presto result sets","Centralize SQL-to-Java type conversion in application code"],"tags":["jdbc","presto","unsupported-feature","type-mapping","sqlfeaturenotsupported"],"backgroundTag":"unsupported-jdbc-feature","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"}