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

Andrey Mashenkov updated IGNITE-12561:
--------------------------------------
    Summary: SQL: Fix incorrect check for conflict of field names in key and 
value.  (was: Add a check for conflict of field names in key and value)

> SQL: Fix incorrect check for conflict of field names in key and value.
> ----------------------------------------------------------------------
>
>                 Key: IGNITE-12561
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12561
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Evgeniy Rudenko
>            Assignee: Evgeniy Rudenko
>            Priority: Major
>             Fix For: 2.9
>
>
> If key and value types of an SQL-enabled cache have the same fields annotated 
> with `@QuerySqlEntity` the cache will start without errors but the key's 
> field will not be queryable:
> {noformat}
> // here, you can't query Key.a via SQL
> class Key {
>    @QuerySqlField int a; 
>    @QuerySqlField int b; 
> }
> class Value { 
>    @QuerySqlField int a;
>    @QuerySqlField int c;
> }
> {noformat}
>  
> To workaround that, one needs to specify a different name for one of the `a` 
> fields: 
> {noformat}
> class Key {
>    @QuerySqlField(name = "key_a") int a;
>    @QuerySqlField int b; 
> }
> class Value {
>    @QuerySqlField int a; 
>    @QuerySqlField int c;
> }
> {noformat}
> The first configuration is obviously incorrect - one can't use the `Key.a` in 
> SQL but annotates it as queryable. We need to issue an error or at least a 
> warning for starting a configuration like this.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to