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

Revise modification of CursorFactory in LocalService#toResponse

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: avatica
    • Labels:
      None

      Description

      The LocalService#toResponse method is responsible for transforming a MetaResultSet to ResultSetResponse and in the process of doing this it may also change the CursorFactory that was passed in MetaResultSet.

      The reasons for changing the CursorFactory inside this method are not obvious and appear a bit arbitrary at the moment. It seems that changing the CursorFactory in this method is tightly connected to Calcite (as a client) and may not work for other clients.

      From a high level perspective a CursorFactory is necessary to be able to generate the appropriate Cursor. In principle the client who creates MetaResultSet is supposed to know what cursor it needs and so I assume that it should pass the correct CursorFactory.

      The goal of this issue is to revise the respective code in LocalService#toResponse to make the intentions clear. Changes here are potentially breaking and may require also changes in Calcite and other clients.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              zabetak Stamatis Zampetakis
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: