You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Istvan Toth (Jira)" <ji...@apache.org> on 2022/05/04 15:32:00 UTC
[jira] [Updated] (PHOENIX-6665) PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ"
[ https://issues.apache.org/jira/browse/PHOENIX-6665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Istvan Toth updated PHOENIX-6665:
---------------------------------
Release Note:
PreparedStatement#getMetaData() no longer fails on parametrized "select next ? values" sequence operations.
This also fixes a problem where parametrized sequence operations didn't work via Phoenix Query Server.
> PreparedStatement#getMetaData() fails on parametrized "select next ? values for SEQ"
> -------------------------------------------------------------------------------------
>
> Key: PHOENIX-6665
> URL: https://issues.apache.org/jira/browse/PHOENIX-6665
> Project: Phoenix
> Issue Type: Bug
> Components: core
> Affects Versions: 5.2.0
> Reporter: Istvan Toth
> Assignee: Istvan Toth
> Priority: Major
> Fix For: 4.17.0, 5.2.0, 4.16.2, 5.13
>
>
>
> {code:java}
> PreparedStatement nextStmt = conn.prepareStatement("SELECT NEXT ? VALUES FOR SEQ_TABLE");
> nextStmt.getMetaData();{code}
> Fails.
> According to the PreparedStatement javadoc, this should work:
> {quote}
> Because a {{PreparedStatement}} object is precompiled, it is possible to know about the {{ResultSet}} object that it will return without having to execute it. Consequently, it is possible to invoke the method {{getMetaData}} on a {{PreparedStatement}} object rather than waiting to execute it and then invoking the {{ResultSet.getMetaData}} method on the {{ResultSet}} object that is returned.
> {quote}
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)