You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "duan xiong (Jira)" <ji...@apache.org> on 2021/04/19 12:30:00 UTC
[jira] [Comment Edited] (CALCITE-4585) when use prepareStatement
parse and run RelNode or Queryable, Maybe Confusing log information be
thrown
[ https://issues.apache.org/jira/browse/CALCITE-4585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17324987#comment-17324987 ]
duan xiong edited comment on CALCITE-4585 at 4/19/21, 12:29 PM:
----------------------------------------------------------------
[~zabetak] Yes, If we run RelNode or Queryable expression directly, When shows parse error or metadata validate wrong,This exception show the confuse log exception(Error while preparing statement [null]). Ok I will try to add test cases. Thank you.
was (Author: nobigo):
Yes, If we run RelNode or Queryable expression directly, When shows parse error or metadata validate wrong,This exception show the confuse log exception(Error while preparing statement [null]). Ok I will try to add test cases. Thank you.
> when use prepareStatement parse and run RelNode or Queryable, Maybe Confusing log information be thrown
> -------------------------------------------------------------------------------------------------------
>
> Key: CALCITE-4585
> URL: https://issues.apache.org/jira/browse/CALCITE-4585
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.26.0
> Reporter: duan xiong
> Assignee: duan xiong
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> This code capture the exception,But Only the output of SQL exception is processed.So need to add the procedure to handle extra exception.
> {code:java}
> //
> try {
> final Meta.Signature signature =
> parseQuery(query, createPrepareContext(), -1);
> final CalcitePreparedStatement calcitePreparedStatement =
> (CalcitePreparedStatement) factory.newPreparedStatement(this, null,
> signature, resultSetType, resultSetConcurrency, resultSetHoldability);
> server.getStatement(calcitePreparedStatement.handle).setSignature(signature);
> return calcitePreparedStatement;
> } catch (Exception e) {
> throw Helper.INSTANCE.createException(
> "Error while preparing statement [" + query.sql + "]", e);
> }
> {code}
> When we run RelNode or queryable show wrong,this exception can be:
> "Error while preparing statement [null]"
> can't log the real exception
--
This message was sent by Atlassian Jira
(v8.3.4#803005)