You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Evgenii Zhuravlev (JIRA)" <ji...@apache.org> on 2019/02/27 02:16:00 UTC

[jira] [Commented] (IGNITE-11373) varchar_ignorecase doesn't work properly

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

Evgenii Zhuravlev commented on IGNITE-11373:
--------------------------------------------

I did the analysis of this issue and added an additional flag for the H2 connection string(org.apache.ignite.internal.processors.query.h2.ConnectionManager#DB_OPTIONS): IGNORECASE=TRUE; 

It started to work, however, after adding an index on this field, it starts to fail in 2 places on the field type validation: InlineIndexHelper:
On creating the index:
     if (this.type != type)
            throw new UnsupportedOperationException("Invalid fast index type: " + type);
And on reading:
        if (val.getType() != type)
            throw new UnsupportedOperationException("value type doesn't match");

After commenting these lines, looks like everything started to work. I see that it works much faster than without index. So, looks like it something that could be fixed pretty fast, we just need to figure out how to change this type check.


> varchar_ignorecase doesn't work properly
> ----------------------------------------
>
>                 Key: IGNITE-11373
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11373
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Evgenii Zhuravlev
>            Priority: Major
>
> Looks like a field with type varchar_ignorecase can't be used for filtering the values for different cases.
> {code:java}
> Ignite ignite = Ignition.start("examples/config/example-ignite.xml");
>         
>         IgniteCache cache = ignite.getOrCreateCache("TEST");
>         cache.query(new SqlFieldsQuery("CREATE TABLE IF NOT EXISTS TEST\n" +
>             "(\n" +
>             "  TEST_ID                NUMBER(15)        NOT NULL,\n" +
>             "  TEST_VALUE             VARCHAR_IGNORECASE(100),\n" +
>             "  PRIMARY KEY (TEST_ID)\n" +
>             ") "));
>         System.out.println("INSERTED:" + ignite.cache("TEST").query(new SqlFieldsQuery("INSERT INTO TEST values (1,'aAa')")).getAll().size());
>         System.out.println("FOUND:" + ignite.cache("TEST").query(new SqlFieldsQuery("Select * from TEST where TEST_VALUE like '%aaa%'")).getAll().size());
> {code}



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