You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Ng Jiunn Jye (JIRA)" <ji...@apache.org> on 2015/04/06 17:54:12 UTC

[jira] [Created] (CALCITE-667) AvaticaResultSet.execute expecting Array Iterable from Delete Statement

Ng Jiunn Jye created CALCITE-667:
------------------------------------

             Summary: AvaticaResultSet.execute expecting Array Iterable from Delete Statement
                 Key: CALCITE-667
                 URL: https://issues.apache.org/jira/browse/CALCITE-667
             Project: Calcite
          Issue Type: Bug
            Reporter: Ng Jiunn Jye
            Assignee: Julian Hyde


Delete execution should return the number of rows impacted. However 
AvaticaResultStatement.execute was expecting an array. See error stack trace below. 

This is caused by the CalcitePrepareImpl.prepare_2 RelDataType createDmlRowType is not defined properly for SqlKind DELETE. Same problem for UPDATE

Error Stack: 
Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
	at java.util.Arrays$ArrayList.get(Arrays.java:2877)
	at org.apache.calcite.avatica.util.RecordIteratorCursor.createGetter(RecordIteratorCursor.java:59)
	at org.apache.calcite.avatica.util.AbstractCursor.createAccessor(AbstractCursor.java:80)
	at org.apache.calcite.avatica.util.AbstractCursor.createAccessors(AbstractCursor.java:70)
	at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:187)




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)