ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Valentin Kulichenko <valentin.kuliche...@gmail.com>
Subject Fwd: SQL IN operator example
Date Fri, 25 Sep 2015 23:39:43 GMT
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 <kevin.chan@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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message