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

Vasiliy Sisko updated IGNITE-7960:
----------------------------------
    Description: 
1) On run of demo mode in Web console in Queries page for every query showed 
error. F.e.:
Error: Table "CAR" not found.
After debug I notice that org.h2.schema.Schema#tablesAndViews map contains key 
with type name stored as "Car". In that case query parser require "CAR" name 
and query fail.
Caches created by invocation of java config 
org.apache.ignite.Ignite#getOrCreateCaches

I create simple reproducer (See files TestQuery.java and Country.java), but 
metadata and parser in that case use the same name "Car". 
Caches created by invocation of java config 
org.apache.ignite.Ignite#getOrCreateCaches

Configured in XML cache has normalised name of type "CAR". In that case parser 
too require "CAR" name and work without error.
Caches created in process of cluster activation.
{code}
    <bean id="c_partitioned2" abstract="true" parent="default_partitioned">
        <property name="name" value="c_partitioned2"/>

        <property name="indexedTypes">
            <list>
                <value>java.util.UUID</value>
                <value>org.ignite.sql.Car</value>
            </list>
        </property>

        <property name="queryEntities">
            <list>
                <bean class="org.apache.ignite.cache.QueryEntity">
                    <property name="keyType" value="org.ignite.sql.AddressKey"/>
                    <property name="valueType" value="org.ignite.sql.Address"/>

                    <property name="keyFields">
                        <list>
                            <value>pk</value>
                        </list>
                    </property>

                    <property name="fields">
                        <map>
                            <entry key="pk" value="java.lang.Integer"/>
                            <entry key="street" value="java.lang.String"/>
                            <entry key="zip" value="java.lang.Integer"/>
                        </map>
                    </property>

                    <property name="indexes">
                        <list>
                            <bean class="org.apache.ignite.cache.QueryIndex">
                                <property name="name" value="ZIP_DESC_IDX"/>
                                <property name="fields">
                                    <map>
                                        <entry key="zip" value="false"/>
                                    </map>
                                </property>
                                <property name="indexType" value="SORTED"/>
                            </bean>
                            <bean class="org.apache.ignite.cache.QueryIndex">
                                <property name="name" value="STREET_TXT_IDX"/>
                                <property name="fields">
                                    <map>
                                        <entry key="street" value="true"/>
                                    </map>
                                </property>
                                <property name="indexType" value="FULLTEXT"/>
                            </bean>
                            <bean class="org.apache.ignite.cache.QueryIndex">
                                <property name="name" value="GRP_IDX"/>
                                <property name="fields">
                                    <map>
                                        <entry key="street" value="true"/>
                                        <entry key="zip" value="true"/>
                                    </map>
                                </property>
                                <property name="indexType" value="SORTED"/>
                            </bean>
                        </list>
                    </property>
                </bean>
                <bean class="org.apache.ignite.cache.QueryEntity">
                    <property name="keyType" value="org.ignite.sql.CountryKey"/>
                    <property name="valueType" 
value="org.ignite.sql.CountryVal"/>

                    <property name="keyFields">
                        <list>
                            <value>pk</value>
                        </list>
                    </property>

                    <property name="fields">
                        <map>
                            <entry key="pk" value="java.lang.Integer"/>
                            <entry key="name" value="java.lang.String"/>
                            <entry key="population" value="java.lang.Integer"/>
                        </map>
                    </property>

                    <property name="indexes">
                        <list>
                            <bean class="org.apache.ignite.cache.QueryIndex">
                                <property name="name" 
value="Country_name_ppl_IDX"/>
                                <property name="fields">
                                    <map>
                                        <entry key="name" value="true"/>
                                        <entry key="population" value="false"/>
                                    </map>
                                </property>
                                <property name="indexType" value="SORTED"/>
                            </bean>
                        </list>
                    </property>
                </bean>
            </list>
        </property>
    </bean>
{code}

  was:
1) On run of demo mode in Web console in Queries page for every query showed 
error. F.e.:
Error: Table "CAR" not found.
After debug I notice that org.h2.schema.Schema#tablesAndViews map contains key 
with type name stored as "Car". In that case query parser require "CAR" name 
and query fail.
Caches created by invocation of java config 
org.apache.ignite.Ignite#getOrCreateCaches

I create simple reproducer (See files TestQuery.java and Country.java), but 
metadata and parser in that case use the same name "Car". 
Caches created by invocation of java config 
org.apache.ignite.Ignite#getOrCreateCaches

Configured in XML cache has normalised name of type "CAR". In that case parser 
too require "CAR" name and work without error.
Caches created in process of cluster activation


> Wrong type name in cache metadata on query execution
> ----------------------------------------------------
>
>                 Key: IGNITE-7960
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7960
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache, sql
>    Affects Versions: 2.5
>            Reporter: Vasiliy Sisko
>            Assignee: Vladimir Ozerov
>            Priority: Major
>         Attachments: Country.java, TestQuery.java
>
>
> 1) On run of demo mode in Web console in Queries page for every query showed 
> error. F.e.:
> Error: Table "CAR" not found.
> After debug I notice that org.h2.schema.Schema#tablesAndViews map contains 
> key with type name stored as "Car". In that case query parser require "CAR" 
> name and query fail.
> Caches created by invocation of java config 
> org.apache.ignite.Ignite#getOrCreateCaches
> I create simple reproducer (See files TestQuery.java and Country.java), but 
> metadata and parser in that case use the same name "Car". 
> Caches created by invocation of java config 
> org.apache.ignite.Ignite#getOrCreateCaches
> Configured in XML cache has normalised name of type "CAR". In that case 
> parser too require "CAR" name and work without error.
> Caches created in process of cluster activation.
> {code}
>     <bean id="c_partitioned2" abstract="true" parent="default_partitioned">
>         <property name="name" value="c_partitioned2"/>
>         <property name="indexedTypes">
>             <list>
>                 <value>java.util.UUID</value>
>                 <value>org.ignite.sql.Car</value>
>             </list>
>         </property>
>         <property name="queryEntities">
>             <list>
>                 <bean class="org.apache.ignite.cache.QueryEntity">
>                     <property name="keyType" 
> value="org.ignite.sql.AddressKey"/>
>                     <property name="valueType" 
> value="org.ignite.sql.Address"/>
>                     <property name="keyFields">
>                         <list>
>                             <value>pk</value>
>                         </list>
>                     </property>
>                     <property name="fields">
>                         <map>
>                             <entry key="pk" value="java.lang.Integer"/>
>                             <entry key="street" value="java.lang.String"/>
>                             <entry key="zip" value="java.lang.Integer"/>
>                         </map>
>                     </property>
>                     <property name="indexes">
>                         <list>
>                             <bean class="org.apache.ignite.cache.QueryIndex">
>                                 <property name="name" value="ZIP_DESC_IDX"/>
>                                 <property name="fields">
>                                     <map>
>                                         <entry key="zip" value="false"/>
>                                     </map>
>                                 </property>
>                                 <property name="indexType" value="SORTED"/>
>                             </bean>
>                             <bean class="org.apache.ignite.cache.QueryIndex">
>                                 <property name="name" value="STREET_TXT_IDX"/>
>                                 <property name="fields">
>                                     <map>
>                                         <entry key="street" value="true"/>
>                                     </map>
>                                 </property>
>                                 <property name="indexType" value="FULLTEXT"/>
>                             </bean>
>                             <bean class="org.apache.ignite.cache.QueryIndex">
>                                 <property name="name" value="GRP_IDX"/>
>                                 <property name="fields">
>                                     <map>
>                                         <entry key="street" value="true"/>
>                                         <entry key="zip" value="true"/>
>                                     </map>
>                                 </property>
>                                 <property name="indexType" value="SORTED"/>
>                             </bean>
>                         </list>
>                     </property>
>                 </bean>
>                 <bean class="org.apache.ignite.cache.QueryEntity">
>                     <property name="keyType" 
> value="org.ignite.sql.CountryKey"/>
>                     <property name="valueType" 
> value="org.ignite.sql.CountryVal"/>
>                     <property name="keyFields">
>                         <list>
>                             <value>pk</value>
>                         </list>
>                     </property>
>                     <property name="fields">
>                         <map>
>                             <entry key="pk" value="java.lang.Integer"/>
>                             <entry key="name" value="java.lang.String"/>
>                             <entry key="population" 
> value="java.lang.Integer"/>
>                         </map>
>                     </property>
>                     <property name="indexes">
>                         <list>
>                             <bean class="org.apache.ignite.cache.QueryIndex">
>                                 <property name="name" 
> value="Country_name_ppl_IDX"/>
>                                 <property name="fields">
>                                     <map>
>                                         <entry key="name" value="true"/>
>                                         <entry key="population" 
> value="false"/>
>                                     </map>
>                                 </property>
>                                 <property name="indexType" value="SORTED"/>
>                             </bean>
>                         </list>
>                     </property>
>                 </bean>
>             </list>
>         </property>
>     </bean>
> {code}



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

Reply via email to