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

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None

    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

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

              Dates

                Created:
                Updated:
                Resolved: