ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maxim Pudov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-7793) SQL does not work if value has sql field which name equals to affinity key name
Date Mon, 17 Sep 2018 12:58:00 GMT

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

Maxim Pudov updated IGNITE-7793:
--------------------------------
    Summary: SQL does not work if value has sql field which name equals to affinity key name
 (was: SQL does not work if value has index field which name equals to affinity key name)

> SQL does not work if value has sql field which name equals to affinity key name
> -------------------------------------------------------------------------------
>
>                 Key: IGNITE-7793
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7793
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.3
>            Reporter: Mikhail Cherkasov
>            Assignee: Maxim Pudov
>            Priority: Blocker
>             Fix For: 2.7
>
>
> SQL does not work if value has index filed which name equals to affinity key name:
> {code:java}
> public class AKey {
>     @AffinityKeyMapped
>     int a;
>     public AKey(int a) {
>         this.a = a;
>     }
> }
> public class AVal {
>     @QuerySqlField
>     int a;
>     public AVal(int a) {
>         this.a = a;
>     }
> }
> AKey aKey = new AKey(1);
> AVal aVal = new AVal(0);
> IgniteCache<Object, Object> cache = ignite.cache("Instrument");
> cache.put(aKey, aVal);
> SqlFieldsQuery query = new SqlFieldsQuery("select * from \"Instrument\".AVal it where
it.a=?");
> List<List<?>> res = cache.query(query.setArgs(0)).getAll();
> if(res.isEmpty()) {
>     System.out.println("!!!!!!!!! FAILED !!!!!!!!!!!");
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message