[
https://issues.apache.org/jira/browse/PHOENIX-3581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Maryann Xue resolved PHOENIX-3581.
----------------------------------
Resolution: Fixed
> 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: Sub-task
> Reporter: Maryann Xue
> Assignee: Maryann Xue
> Priority: Minor
> Labels: calcite
>
> 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)