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

Incorrect mapping of JDBC float/real array types to Java types

    XMLWordPrintableJSON

Details

    Description

      This is an issue I found while working on CALCITE-3162: According to my understanding, the method AbstractCursor#convertValue(), used for converting the component types of ARRAYs, does not adhere to what is specified in the JDBC specification (Appendix B) regarding mapping of types:

      • The JDBC types FLOAT (6) and DOUBLE (8) should actually both map to Java double or Double respectively. Currently, FLOAT (6) is converted to a float.
      • The implementation is currently missing support for JDBC type REAL (7), which should convert to float or Float respectively

      This issue will cause an IllegalStateException to be thrown in clients using the Avatica Driver if they encounter REAL datatype in arrays.

      Attachments

        1. patch0001.diff
          1 kB
          Ralph Gasser

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ppanopticon Ralph Gasser
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h
                  3h