Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-3104 Enable Phoenix test cases with Calcite-Phoenix
  3. PHOENIX-3581

Class-cast exceptions caused by TestUtil.getSplits() and TestUtil.getGuidePostsList()

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      These test utility methods are trying to convert a PrepareStatement object initiated by the current JDBC Connection into a PhoenixPreparedStatement. While we have switched to Calcite-Phoenix connections for tests, the PreparedStatement created by the connection will no longer be a PhoenixPreparedStatement object, so we need to get the original PhoenixConnection object for such util methods.

              String query = "SELECT /*+ NO_INDEX */ COUNT(*) FROM " + tableName + whereClause;
              PhoenixPreparedStatement pstmt = conn.prepareStatement(query).unwrap(PhoenixPreparedStatement.class);
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                maryannxue Wei Xue
                Reporter:
                maryannxue Wei Xue
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: