diff --git a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulResultSet.java b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulResultSet.java index 30081a63c3e8a77208b29ddbf1fc34079d4c2818..0cbb40dbb69f9e3b6b8fb2cc5bfd6ddac6ea4aef 100644 --- a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulResultSet.java +++ b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulResultSet.java @@ -136,7 +136,8 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet { throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_PARAMETER_INDEX_OUT_RANGE, "Column Index out of range, " + columnIndex + " > " + resultSet.get(pos).size()); columnIndex = getTrueColumnIndex(columnIndex); - return resultSet.get(pos).get(columnIndex).toString(); + Object value = resultSet.get(pos).get(columnIndex); + return value == null ? null : value.toString(); } @Override