You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/05/08 20:02:13 UTC
[jira] [Commented] (CALCITE-1232) AvaticaStatement should fail fast
on executeBatch() if no statements are present in the batch
[ https://issues.apache.org/jira/browse/CALCITE-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15275696#comment-15275696 ]
Julian Hyde commented on CALCITE-1232:
--------------------------------------
Is that standard behavior? As a mathematician I'd be inclined to say that an empty batch is valid and should trivially succeed.
> AvaticaStatement should fail fast on executeBatch() if no statements are present in the batch
> ---------------------------------------------------------------------------------------------
>
> Key: CALCITE-1232
> URL: https://issues.apache.org/jira/browse/CALCITE-1232
> Project: Calcite
> Issue Type: Improvement
> Components: avatica
> Reporter: Josh Elser
> Assignee: Josh Elser
> Fix For: avatica-1.8.0
>
>
> Ran into a little bug. I prepared a batch of updates via a PreparedStatement but then accidentally called {{executeBatch()}} on another Statement object which was currently in scope. This was causing my test to fail because it appeared that there were no updates applied in the returned {{int[]}}.
> We should make {{executeBatch()}} on both {{AvaticaStatement}} and {{AvaticaPreparedStatement}} fail with an exception if the current batch is empty.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)