Maryann Xue created PHOENIX-3581:
------------------------------------

             Summary: Class-cast exceptions caused by TestUtil.getSplits() and 
TestUtil.getGuidePostsList()
                 Key: PHOENIX-3581
                 URL: https://issues.apache.org/jira/browse/PHOENIX-3581
             Project: Phoenix
          Issue Type: Bug
            Reporter: Maryann Xue
            Assignee: Maryann Xue
            Priority: Minor


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.
{code}
        String query = "SELECT /*+ NO_INDEX */ COUNT(*) FROM " + tableName + 
whereClause;
        PhoenixPreparedStatement pstmt = 
conn.prepareStatement(query).unwrap(PhoenixPreparedStatement.class);
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to