{"record":{"id":"a419c98db150bfcd","repo":"prestodb/presto","slug":"not-implemented-preparedstatement-settime","errorCode":null,"errorMessage":"Not implemented: PreparedStatement.setTime","messagePattern":"Not implemented: PreparedStatement\\.setTime","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java","lineNumber":533,"sourceCode":"            throws SQLException\n    {\n        try (Statement statement = connection().createStatement(); ResultSet resultSet = statement.executeQuery(\"DESCRIBE OUTPUT \" + statementName)) {\n            return new PrestoResultSetMetaData(getDescribeOutputColumnInfoList(resultSet));\n        }\n    }\n\n    @Override\n    public void setDate(int parameterIndex, Date x, Calendar cal)\n            throws SQLException\n    {\n        throw new NotImplementedException(\"PreparedStatement\", \"setDate\");\n    }\n\n    @Override\n    public void setTime(int parameterIndex, Time x, Calendar cal)\n            throws SQLException\n    {\n        throw new NotImplementedException(\"PreparedStatement\", \"setTime\");\n    }\n\n    @Override\n    public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal)\n            throws SQLException\n    {\n        throw new NotImplementedException(\"PreparedStatement\", \"setTimestamp\");\n    }\n\n    @Override\n    public void setNull(int parameterIndex, int sqlType, String typeName)\n            throws SQLException\n    {\n        setNull(parameterIndex, sqlType);\n    }\n\n    @Override\n    public void setURL(int parameterIndex, URL x)","sourceCodeStart":515,"sourceCodeEnd":551,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java#L515-L551","documentation":"setTime(int, Time, Calendar) — the Calendar-aware TIME binding — is not implemented in the Presto JDBC driver and throws NotImplementedException. The two-argument setTime works; the Calendar overload does not.","triggerScenarios":"Calling PreparedStatement.setTime(parameterIndex, Time, Calendar) on a Presto connection.","commonSituations":"Ported code relying on Calendar-based timezone shifting of TIME values.","solutions":["Use the two-argument setTime(parameterIndex, Time).","Convert the time to the target timezone yourself before binding.","Control timezone via the connection's user/session properties."],"exampleFix":"// before\nps.setTime(1, sqlTime, cal);\n// after\nps.setTime(1, sqlTime);","handlingStrategy":"fallback","validationCode":"if (cal != null) { /* pre-convert the Time yourself and call the 2-arg setTime */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the two-argument setTime overload","Do timezone shifting in application code before binding","Test time semantics when porting from other JDBC drivers"],"tags":["jdbc","presto","unimplemented","timezone"],"backgroundTag":"jdbc-feature-not-implemented","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"}