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/03/11 07:48:00 UTC
[jira] [Created] (PHOENIX-6665) PreparedStatement#getMetaData() fails on paremetrized "select next ? values for SEQ"
Istvan Toth created PHOENIX-6665:
------------------------------------
Summary: PreparedStatement#getMetaData() fails on paremetrized "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
{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.1#820001)