[jira] [Updated] (IGNITE-12561) SQL: Fix incorrect check for conflict of field names in key and value.
[ https://issues.apache.org/jira/browse/IGNITE-12561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Evgeniy Rudenko updated IGNITE-12561: - Release Note: Added validation of the uniqueness of field's name annotated with @QuerySqlEntity. Previously cache could be started without errors, but the key's field would not be queryable: > 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 > > Time Spent: 10m > Remaining Estimate: 0h > > 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)
[jira] [Updated] (IGNITE-12561) SQL: Fix incorrect check for conflict of field names in key and value.
[ 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)