ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valentin Kulichenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-6996) Smarter handling of id fields in SQL values
Date Thu, 11 Jan 2018 23:29:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-6996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16323209#comment-16323209

Valentin Kulichenko commented on IGNITE-6996:

This seems to be a very specific use case with a lot of counter intuitive drawback. I propose
to close this ticket with 'Won't Fix' resolution.

> Smarter handling of id fields in SQL values
> -------------------------------------------
>                 Key: IGNITE-6996
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6996
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Alexander Paschenko
> Consider such case:
> User wants to have a composite value (many value fields in {{QueryEntity}}) with one
field associated with value's id (most likely matching cache key too).
> Currently in order to insert such an object we will have to do something like
> {{INSERT INTO Person(_key, id, name) values(1, 1, 'John')}}
> And there's no way to avoid such a redundant repeat of the same value.
> Suggested approach: I believe that we should specifically handle the case when user specifies
{{keyFieldName}} in configuration and specified field is field of the value.
> In such case, we could just do {{INSERT INTO Person(id, name) values(1, 'John')}} and
derive {{_key}} value from {{id}} column. (And vice versa.)
> At a glance, this also will require following tweaks:
> - forbid performing SQL {{UPDATE}} on such column ({{id}} in above example);
> - on an {{INSERT}}, check that {{_key}} and {{id}} values are the same, if both specified.

This message was sent by Atlassian JIRA

View raw message