{"record":{"id":"1da6530b550f0df6","repo":"prestodb/presto","slug":"unsupported-target-sql-type","errorCode":null,"errorMessage":"Unsupported target SQL type: ","messagePattern":"Unsupported target SQL type: ","errorType":"exception","errorClass":"SQLException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java","lineNumber":375,"sourceCode":"                return;\n            case Types.BINARY:\n            case Types.VARBINARY:\n            case Types.LONGVARBINARY:\n                setBytes(parameterIndex, castToBinary(x, targetSqlType));\n                return;\n            case Types.DATE:\n                setDate(parameterIndex, castToDate(x, targetSqlType));\n                return;\n            case Types.TIME:\n                setTime(parameterIndex, castToTime(x, targetSqlType));\n                return;\n            case Types.TIMESTAMP:\n                setTimestamp(parameterIndex, castToTimestamp(x, targetSqlType));\n                return;\n            // TODO Types.TIME_WITH_TIMEZONE\n            // TODO Types.TIMESTAMP_WITH_TIMEZONE\n        }\n        throw new SQLException(\"Unsupported target SQL type: \" + targetSqlType);\n    }\n\n    @Override\n    public void setObject(int parameterIndex, Object x, SQLType targetSqlType)\n            throws SQLException\n    {\n        setObject(parameterIndex, x, targetSqlType.getVendorTypeNumber());\n    }\n\n    @Override\n    public void setObject(int parameterIndex, Object x)\n            throws SQLException\n    {\n        checkOpen();\n        if (x == null) {\n            setNull(parameterIndex, Types.NULL);\n        }\n        else if (x instanceof Boolean) {","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java#L357-L393","documentation":"In setObject(parameterIndex, x, targetSqlType) the switch over targetSqlType has no case matching the requested JDBC type (and no default conversion), so the driver throws this SQLException. It means the requested target SQL type is not supported for object conversion by the Presto driver — a generic guard reached with an out-of-support targetSqlType value.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java:375 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported targetSqlType such as BOOLEAN, INTEGER, BIGINT, DOUBLE, VARCHAR, VARBINARY, DATE, TIME or TIMESTAMP","Set the object without an explicit target type via setObject(index, value) where possible","Convert the value in Java to a supported Java class before binding"],"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"}