Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-6665

PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.2.0
    • 4.17.0, 5.2.0, 4.16.2, 5.1.3
    • core
    • None
    • Hide
      PreparedStatement#getMetaData() no longer fails on parametrized "select next ? values" sequence operations.
      This also fixes a problem where parametrized sequence operations didn't work via Phoenix Query Server.
      Show
      PreparedStatement#getMetaData() no longer fails on parametrized "select next ? values" sequence operations. This also fixes a problem where parametrized sequence operations didn't work via Phoenix Query Server.

    Description

       

      PreparedStatement nextStmt = conn.prepareStatement("SELECT NEXT ? VALUES FOR SEQ_TABLE");
      nextStmt.getMetaData();

      Fails.

      According to the PreparedStatement javadoc, this should work:

      Because a PreparedStatement object is precompiled, it is possible to know about the ResultSet object that it will return without having to execute it. Consequently, it is possible to invoke the method getMetaData on a PreparedStatement object rather than waiting to execute it and then invoking the ResultSet.getMetaData method on the ResultSet object that is returned.

       

      Attachments

        Issue Links

          Activity

            People

              stoty Istvan Toth
              stoty Istvan Toth
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: