[
https://issues.apache.org/jira/browse/CALCITE-1278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15325149#comment-15325149
]
Maryann Xue edited comment on CALCITE-1278 at 6/10/16 7:41 PM:
---------------------------------------------------------------
[~julianhyde], Could you please take a look at this patch? I'm going to file a
couple of other JIRAs for the rest of DML ops. The way I implement "equals()"
JdbcTest data object classes would probably make UPDATE easier.
was (Author: maryannxue):
[~julianhyde], Could you please take a look at this patch? I'm going to file a
couple of other JIRAs for the rest of DML ops.
> CalciteSignature's ColumnMetaData info is wrong for DML (except INSERT)
> -----------------------------------------------------------------------
>
> Key: CALCITE-1278
> URL: https://issues.apache.org/jira/browse/CALCITE-1278
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.7.0
> Reporter: Maryann Xue
> Assignee: Maryann Xue
> Attachments: CALCITE-1278.patch
>
>
> DELETE, as one type of TableModify operation, has the same RelDataType as
> INSERT, which is RelRecordType(ROWCOUNT INTEGER). But during "prepare" stage,
> the corresponding ColumnMetaData info becomes inconsistent, due to:
> {code}
> preparedResult = preparingStmt.prepareSql(
> sqlNode, Object.class, validator, true);
> switch (sqlNode.getKind()) {
> case INSERT:
> case EXPLAIN:
> // FIXME: getValidatedNodeType is wrong for DML
> x = RelOptUtil.createDmlRowType(sqlNode.getKind(), typeFactory);
> break;
> default:
> x = validator.getValidatedNodeType(sqlNode);
> }
> {code}
> I've noticed that there is a "FIXME: getValidatedNodeType is wrong for DML".
> Guess that's the root cause, and RelOptUtil.createDmlRowType() is probably a
> workaround? For now, we can simply include DELETE and other TableModify
> Operation in the first switch case.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)