You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Maryann Xue (JIRA)" <ji...@apache.org> on 2017/01/09 19:45:58 UTC
[jira] [Updated] (PHOENIX-3581) Class-cast exceptions caused by
TestUtil.getSplits() and TestUtil.getGuidePostsList()
[ https://issues.apache.org/jira/browse/PHOENIX-3581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maryann Xue updated PHOENIX-3581:
---------------------------------
Issue Type: Sub-task (was: Bug)
Parent: PHOENIX-3104
> 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)