mihaibudiu commented on code in PR #267: URL: https://github.com/apache/calcite-avatica/pull/267#discussion_r1912516502
########## core/src/main/java/org/apache/calcite/avatica/AvaticaConnection.java: ########## @@ -614,18 +614,20 @@ private void isUpdateCapable(final AvaticaStatement statement) return; } if (signature.statementType.canUpdate() && statement.updateCount == -1) { - statement.openResultSet.next(); - Object obj = statement.openResultSet.getObject(ROWCOUNT_COLUMN_NAME); - if (obj instanceof Number) { - statement.updateCount = ((Number) obj).intValue(); - } else if (obj instanceof List) { - @SuppressWarnings("unchecked") - final List<Number> numbers = (List<Number>) obj; - statement.updateCount = numbers.get(0).intValue(); - } else { - throw HELPER.createException("Not a valid return result."); + if (statement.openResultSet.next()) { + statement.openResultSet.next(); Review Comment: this cannot be right, you are advancing the cursor twice -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org