diff --git a/src/main/java/com/aliyun/odps/jdbc/OdpsQueryResultSet.java b/src/main/java/com/aliyun/odps/jdbc/OdpsQueryResultSet.java index b5b780cb..460528e3 100644 --- a/src/main/java/com/aliyun/odps/jdbc/OdpsQueryResultSet.java +++ b/src/main/java/com/aliyun/odps/jdbc/OdpsQueryResultSet.java @@ -197,7 +197,7 @@ public boolean isLast() throws SQLException { @Override public boolean last() throws SQLException { checkClosed(); - cursorRow = totalRows; + cursorRow = totalRows - 1; return totalRows > 0; }