You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by kevin <ke...@leonardo.com> on 2015/09/25 18:21:27 UTC
SQL IN operator example
I'm trying the example with the IN operator here.
https://apacheignite.readme.io/docs/sql-queries#performance-and-usability-considerations
This is the code
Integer[] ids = {Integer.valueOf(0), Integer.valueOf(1)};
System.out.println(personCache.query(new SqlFieldsQuery("select p.firstName
from Person p join table(id bigint = ?) i on p.id =
i.id").setArgs(ids)).getAll());
I get this error though
org.apache.ignite.IgniteException: Syntax error in SQL statement "SELECT
P.FIRSTNAME __C0
FROM TABLE(?[*]1) I
INNER JOIN PERSON_CACHE.PERSON P
WHERE P.ID = I.ID"; expected "identifier" [42001-175]
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:466)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$2.iterator(IgniteH2Indexing.java:777)
at
org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:59)
at
org.apache.ignite.internal.processors.cache.QueryCursorImpl.getAll(QueryCursorImpl.java:71)
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/SQL-IN-operator-example-tp1493.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Fwd: SQL IN operator example
Posted by Valentin Kulichenko <va...@gmail.com>.
Sergi,
Can you please take a look at this issue? I create a ticket and attached
the test to it: https://issues.apache.org/jira/browse/IGNITE-1552
I already made some debugging and I think the reason is that TableFunction
is parsed as an ordinary Function, so it's columnList field is ignored. As
a result, column identifiers are removed from the map query and this causes
syntax error.
Thanks!
-Val
---------- Forwarded message ----------
From: kevin <ke...@leonardo.com>
Date: Fri, Sep 25, 2015 at 9:21 AM
Subject: SQL IN operator example
To: user@ignite.apache.org
I'm trying the example with the IN operator here.
https://apacheignite.readme.io/docs/sql-queries#performance-and-usability-considerations
This is the code
Integer[] ids = {Integer.valueOf(0), Integer.valueOf(1)};
System.out.println(personCache.query(new SqlFieldsQuery("select p.firstName
from Person p join table(id bigint = ?) i on p.id =
i.id").setArgs(ids)).getAll());
I get this error though
org.apache.ignite.IgniteException: Syntax error in SQL statement "SELECT
P.FIRSTNAME __C0
FROM TABLE(?[*]1) I
INNER JOIN PERSON_CACHE.PERSON P
WHERE P.ID = I.ID"; expected "identifier" [42001-175]
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:466)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$2.iterator(IgniteH2Indexing.java:777)
at
org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:59)
at
org.apache.ignite.internal.processors.cache.QueryCursorImpl.getAll(QueryCursorImpl.java:71)
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/SQL-IN-operator-example-tp1493.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: SQL IN operator example
Posted by vkulichenko <va...@gmail.com>.
Kevin,
Fix is merged to master.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/SQL-IN-operator-example-tp1493p1525.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: SQL IN operator example
Posted by Sergi Vladykin <se...@gmail.com>.
No, pull request on GitHub. The link is in Jira issue.
Sergi
2015-09-28 13:21 GMT+03:00 Yakov Zhdanov <yz...@apache.org>:
> Sergi, is it in master?
>
> --Yakov
>
> 2015-09-27 23:31 GMT+03:00 Sergi Vladykin <se...@gmail.com>:
>
>> I've submitted the fix.
>>
>> Sergi
>>
>>
>> 2015-09-26 2:33 GMT+03:00 vkulichenko <va...@gmail.com>:
>>
>>> Hi Kevin,
>>>
>>> I reproduced the issue and created a ticket [1]. I think it will be
>>> fixed in
>>> the next release.
>>>
>>> [1] https://issues.apache.org/jira/browse/IGNITE-1552
>>>
>>> -Val
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://apache-ignite-users.70518.x6.nabble.com/SQL-IN-operator-example-tp1493p1494.html
>>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>>
>>
>>
>
Re: SQL IN operator example
Posted by Yakov Zhdanov <yz...@apache.org>.
Sergi, is it in master?
--Yakov
2015-09-27 23:31 GMT+03:00 Sergi Vladykin <se...@gmail.com>:
> I've submitted the fix.
>
> Sergi
>
>
> 2015-09-26 2:33 GMT+03:00 vkulichenko <va...@gmail.com>:
>
>> Hi Kevin,
>>
>> I reproduced the issue and created a ticket [1]. I think it will be fixed
>> in
>> the next release.
>>
>> [1] https://issues.apache.org/jira/browse/IGNITE-1552
>>
>> -Val
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-ignite-users.70518.x6.nabble.com/SQL-IN-operator-example-tp1493p1494.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>
Re: SQL IN operator example
Posted by Sergi Vladykin <se...@gmail.com>.
I've submitted the fix.
Sergi
2015-09-26 2:33 GMT+03:00 vkulichenko <va...@gmail.com>:
> Hi Kevin,
>
> I reproduced the issue and created a ticket [1]. I think it will be fixed
> in
> the next release.
>
> [1] https://issues.apache.org/jira/browse/IGNITE-1552
>
> -Val
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/SQL-IN-operator-example-tp1493p1494.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
Re: SQL IN operator example
Posted by Sergi Vladykin <se...@gmail.com>.
I've submitted the fix.
Sergi
2015-09-26 2:33 GMT+03:00 vkulichenko <va...@gmail.com>:
> Hi Kevin,
>
> I reproduced the issue and created a ticket [1]. I think it will be fixed
> in
> the next release.
>
> [1] https://issues.apache.org/jira/browse/IGNITE-1552
>
> -Val
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/SQL-IN-operator-example-tp1493p1494.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
Re: SQL IN operator example
Posted by vkulichenko <va...@gmail.com>.
Hi Kevin,
I reproduced the issue and created a ticket [1]. I think it will be fixed in
the next release.
[1] https://issues.apache.org/jira/browse/IGNITE-1552
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/SQL-IN-operator-example-tp1493p1494.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.