Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-667

AvaticaResultSet.execute expecting Array Iterable from Delete Statement

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • avatica

    Description

      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)

      Attachments

        Activity

          People

            Unassigned Unassigned
            jiunnjye Ng Jiunn Jye
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: