You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "YeongWei (JIRA)" <ji...@apache.org> on 2015/06/04 14:23:38 UTC

[jira] [Comment Edited] (CALCITE-705) AvaticaStatement execute method to support DML

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

YeongWei edited comment on CALCITE-705 at 6/4/15 12:22 PM:
-----------------------------------------------------------

Hi [~julianhyde],

I have made the changes as per your guidance, the Work-In-Progress can be found at the following link,

https://github.com/yeongwei/incubator-calcite/commit/1b654b5b58bdea680bce35011638d05b55563f79?diff=split

Highlights,
1. JdbcMeta#prepare needs to handle connection from both underlying data sources (HSQLDB, MYSQL, etc) and also CalciteConnections. To facilitata StatementType information at this level, I have create the AvaticaStatement#getStatementType. Therefore, if the PreparedStatement is a wrapped of AvaticaPreparedStatement then proceed to unwrap then get the StatementType else will treat as null.

2. DDL / DatabaseMetadata scenarios will have the AvaticaStatement#signature as null, therefore additional check added in AvaticaConnection#isUpdateCapable

3. At various point where the routine needs to construct the Signature Objects. If there is existing signature then attempt to reuse the statementType else assumes SELECT.

Let me know what do you think.

Thanks!



was (Author: yeongwei):
Hi [~julianhyde],

I have made the changes as per your guidance, the Work-In-Progress can be found at the following link,

https://github.com/yeongwei/incubator-calcite/commit/1b654b5b58bdea680bce35011638d05b55563f79?diff=split

Highlights,
1. JdbcMeta#prepare needs to handle connection from both underlying data sources (HSQLDB, MYSQL, etc) and also CalciteConnections. To facilitata StatementType information at this level, I have create the AvaticaStatement#getStatementType. Therefore, if the PreparedStatement is a wrapped of AvaticaPreparedStatement then proceed to unwrap then get the StatementType else will treat as null.

2. DDL scenarios will have the AvaticaStatement#signature as null, therefore additional check added in AvaticaConnection#isUpdateCapable

3. At various point where the routine needs to construct the Signature Objects. If there is existing signature then attempt to reuse the statementType else assumes SELECT.

Let me know what do you think.

Thanks!


> AvaticaStatement execute method to support DML
> ----------------------------------------------
>
>                 Key: CALCITE-705
>                 URL: https://issues.apache.org/jira/browse/CALCITE-705
>             Project: Calcite
>          Issue Type: New Feature
>            Reporter: YeongWei
>            Assignee: Julian Hyde
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)