You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Kevin Liew (JIRA)" <ji...@apache.org> on 2017/02/01 15:35:53 UTC

[jira] [Updated] (CALCITE-1510) INSERT/UPSERT should allow values less than number of columns

     [ https://issues.apache.org/jira/browse/CALCITE-1510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Liew updated CALCITE-1510:
--------------------------------
    Attachment: CALCITE-1510.3.patch

Thank you for the feedback [~julianhyde]. I attached a new patch addressing these issues.

{{SqlValidatorImpl}} now uses {{SqlValidatorTable.columnHasDefaultValue}} rather than using {{InitializerExpressionFactory}} directly. 
The validator still owns an {{InitializerExpressionFactory}} to pass the {{SqlToRelConverter}}.

The new patch does comparison of {{NULL}} by comparing the {{SqlTypeName}} and also validates inserting {{NULL}} against column nullability.

I added more test coverage and I am working on test cases for a custom {{Table}} wrapping a custom {{InitializerExpressionFactory}} to verify that it can work for Phoenix.

I plan on having {{AbstractPreparingTable}} own a {{Table}} so that {{MockTable}} will handle test cases for custom {{InitializerExpressionFactory}}. Also, this might allow {{SqlToRelConverter}} to unwrap the {{InitializerExpressionFactory}} instead of passing it through the validator.

> INSERT/UPSERT should allow values less than number of columns
> -------------------------------------------------------------
>
>                 Key: CALCITE-1510
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1510
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Rajeshbabu Chintaguntla
>            Assignee: Julian Hyde
>             Fix For: 1.12.0
>
>         Attachments: CALCITE-1510.2.patch, CALCITE-1510.3.patch, CALCITE-1510.patch
>
>
> Currently calcite not allowing to write if the values less than number of columns. We can write the leading columns with the all values and remaining columns can be considered as null or else we can allow specifying columns and corresponding values. Ping [~julianhyde] [~jamestaylor] [~maryannxue].



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)