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

ColumnsRequest Service call doesn't "fix" ResultSetResponse.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.0
    • Component/s: avatica
    • Labels:
      None

      Description

      Was finally trying to get to the bottom of PHOENIX-1972. Ultimately stumbled onto the subtlety that the ResultSetResponse from ColumnsRequest isn't run through finagle.

      I believe this ultimately causes the ColumnMetaData to be of Types.BIGINT and Rep.PRIMITIVE_LONG instead of Types.BIGINT and Rep.NUMBER.

      This ultimately pushes us to the LongAccessor instead of the NumberAccessor (which is really the BigNumberAccessor) that correctly handles the "cast" from an Integer to a Long that the LongAccessor does not.

      My only concern so far is that I haven't also been able to get this happen via hsqldb in a test. I've only been able to verify it via Phoenix.

        Issue Links

          Activity

          Hide
          jcamachorodriguez Jesus Camacho Rodriguez added a comment -

          Resolved in release 1.5.0 (2015-11-10)

          Show
          jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.5.0 (2015-11-10)
          Hide
          julianhyde Julian Hyde added a comment -

          Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/afd7e2e2. Josh Elser, Thanks for the patch!

          No, it's better to do as you did, and fix finagle.

          If the result is of type Xxx you had better use an XxxAccessor. Not create a YyyAccessor and fix it up to deal with all possible results. Hence my push-back on CALCITE-921.

          Show
          julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/afd7e2e2 . Josh Elser , Thanks for the patch! No, it's better to do as you did, and fix finagle. If the result is of type Xxx you had better use an XxxAccessor. Not create a YyyAccessor and fix it up to deal with all possible results. Hence my push-back on CALCITE-921 .
          Hide
          elserj Josh Elser added a comment -

          Pull request.

          Approach I took ensures that finagle is called on all of the ResultSetResponses. Maybe it's better to also ensure the Accessor will do the right thing?

          Show
          elserj Josh Elser added a comment - Pull request. Approach I took ensures that finagle is called on all of the ResultSetResponses. Maybe it's better to also ensure the Accessor will do the right thing?

            People

            • Assignee:
              elserj Josh Elser
              Reporter:
              elserj Josh Elser
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development