vladErmakov07 commented on a change in pull request #639:
URL: https://github.com/apache/ignite-3/pull/639#discussion_r802757325
##########
File path:
modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/BatchExecuteResult.java
##########
@@ -30,12 +30,30 @@
/** Update counts. */
private int[] updateCnts;
+ /** Error code. */
+ private int errorCode;
+
/**
* Constructor.
*/
public BatchExecuteResult() {
}
+ /**
+ * Constructor.
+ *
+ * @param status Status code.
+ * @param errorCode Product error code.
+ * @param errorMessage Error message.
+ * @param updateCnts Array with success and error markers.
+ */
+ public BatchExecuteResult(int status, int errorCode, String errorMessage,
int[] updateCnts) {
Review comment:
According to JDBC driver BatchUpdateException contract:
"In addition to the information provided by SQLException, a
BatchUpdateException provides the update counts for all commands that were
executed successfully during the batch update, that is, all commands that were
executed before the error occurred."
So even if an error occurs, we have to send partial result.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]