diff --git a/java/openmldb-jdbc/src/main/java/com/_4paradigm/openmldb/jdbc/PreparedStatement.java b/java/openmldb-jdbc/src/main/java/com/_4paradigm/openmldb/jdbc/PreparedStatement.java index cb6f54dccb0..f9d5dc7cdd5 100644 --- a/java/openmldb-jdbc/src/main/java/com/_4paradigm/openmldb/jdbc/PreparedStatement.java +++ b/java/openmldb-jdbc/src/main/java/com/_4paradigm/openmldb/jdbc/PreparedStatement.java @@ -272,13 +272,12 @@ protected void dataBuild() throws SQLException { columnTypes.AddColumnType(types.get(i + 1)); } this.currentRow = SQLRequestRow.CreateSQLRequestRowFromColumnTypes(columnTypes); - // TODO(hw): check if null + if (this.currentRow == null) { + throw new SQLException("fail to create sql request row from column types"); + } this.currentSchema = this.currentRow.GetSchema(); this.orgTypes = this.types; } - if (this.currentRow == null) { - throw new SQLException("fail to build data with null row"); - } if (this.currentSchema == null) { throw new SQLException("fail to build data with null schema"); }