[
https://issues.apache.org/jira/browse/IGNITE-5361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vladimir Ozerov updated IGNITE-5361:
------------------------------------
Component/s: sql
> SQL: naive handling of fixed length CHAR columns
> ------------------------------------------------
>
> Key: IGNITE-5361
> URL: https://issues.apache.org/jira/browse/IGNITE-5361
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Affects Versions: 1.7
> Reporter: Andrey Gura
>
> Use case:
> There is database where primary key has type {{CHAR(N)}} (not {{VARCHAR}}).
> In this case string that have length less than {{N}} will be spaces padded.
> Data has loaded into Ignite cache using {{CacheJdbcPojoStore}}. As result
> string field contains trailing spaces. The following SQL query wont retrieve
> expected value in case when string parameter doesn't contain trailing spaces:
> {noformat}
> select * from MyTable where id = 'some_value_without_trailing spaces'
> {noformat}
> Moreover, if {{readThrough}} is enabled, and {{cache.get()}} operation will
> be invoked, and string identifier in key contains the same value without
> trailing spaces the entry will be loaded from underlying database. As result
> cache will contain two values with differents keys (one of them with trailing
> spaces while other without trailing spaces).
> Looks like usability bug.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)