phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "shining (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-5192) "Parameter value unbound" thrown when use PrepareStatement to getParamMetaData
Date Thu, 14 Mar 2019 03:12:00 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-5192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16792298#comment-16792298
] 

shining commented on PHOENIX-5192:
----------------------------------

[~elserj] Avatica call getParameterMetaData of HashJoinPlan,  which returns parameterMetaData
of ScanPlan and ignores subPlans.
When avatica getParam from parameterMetaData,because missing param of subPlan, this error
occurred.

PhoenixParameterMetaData should return whole plan's parameterMetaData, I suspect this is a
problem.
Do u think that?


> "Parameter value unbound" thrown when use PrepareStatement to getParamMetaData
> ------------------------------------------------------------------------------
>
>                 Key: PHOENIX-5192
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5192
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 5.0.0
>            Reporter: shining
>            Priority: Major
>         Attachments: CreateTable
>
>
> I use QueryServer in phoenix 5.x version, Test code is as follows:
> {code:java}
> Connection connection = DriverManager.getConnection("jdbc:phoenix:thin:http://localhost:8765;serialization=PROTOBUF");
> PreparedStatement ptst = connection.prepareStatement("SELECT A.EVIDENCE_ID, A.APP_ID,
A.APP_NAME FROM BIZ_DATA A JOIN EVIDENCE_AUTH_RECORD B ON A.EVIDENCE_ID=B.EVIDENCE_ID WHERE
B.APP_ID in (?) AND A.APP_ID in (?)");
> ptst.setString(1, "1111");
> ptst.setString(2, "1234");
> ptst.executeQuery();
> {code}
> this will throws Exception:
> ~
> {color:red}java.lang.RuntimeException: java.sql.SQLException: ERROR 2004 (INT05): Parameter
value unbound. Parameter at index 1 is unbound
> 	at org.apache.calcite.avatica.jdbc.JdbcMeta.propagate(JdbcMeta.java:700)
> 	at org.apache.calcite.avatica.jdbc.JdbcMeta.prepare(JdbcMeta.java:726)
> 	at org.apache.calcite.avatica.jdbc.PhoenixJdbcMeta.prepare(PhoenixJdbcMeta.java:54)
> 	at org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:195)
> 	at org.apache.calcite.avatica.remote.Service$PrepareRequest.accept(Service.java:1215)
> 	at org.apache.calcite.avatica.remote.Service$PrepareRequest.accept(Service.java:1186)
> 	at org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:94)
> 	at org.apache.calcite.avatica.remote.ProtobufHandler.apply(ProtobufHandler.java:46)
> 	at org.apache.calcite.avatica.server.AvaticaProtobufHandler.handle(AvaticaProtobufHandler.java:127)
> 	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:534)
> 	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
> 	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
> 	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
> 	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
> 	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
> 	at java.lang.Thread.run(Thread.java:748)
> Caused by: java.sql.SQLException: ERROR 2004 (INT05): Parameter value unbound. Parameter
at index 1 is unbound
> 	at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:518)
> 	at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
> 	at org.apache.phoenix.jdbc.PhoenixParameterMetaData.getParam(PhoenixParameterMetaData.java:89)
> 	at org.apache.phoenix.jdbc.PhoenixParameterMetaData.isSigned(PhoenixParameterMetaData.java:138)
> 	at org.apache.calcite.avatica.jdbc.JdbcMeta.parameters(JdbcMeta.java:276)
> 	at org.apache.calcite.avatica.jdbc.JdbcMeta.signature(JdbcMeta.java:288)
> 	at org.apache.calcite.avatica.jdbc.JdbcMeta.prepare(JdbcMeta.java:721)
> 	... 21 more{color}
> ~
> create table sql attached!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message