You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by minisoft_rm <mi...@hotmail.com> on 2016/03/28 17:20:02 UTC

ignite not support expression: EXISTS?

dear experts, I knew ignite supports ANSI 99 SQL. but seemed not support
expression: EXISTS... really?
Our company sw uses this keyword lots of times.

My testing sql is:"
select * from products as a where  exists(select * from productslp as b
where a.pk=b.itempk and a.pcode='100124');
"
and ignite throw exception like below:

Caused by: class org.apache.ignite.IgniteException: Unsupported expression:
EXISTS(
    SELECT
        B._KEY,
        B._VAL,
        B.ITEMPK,
        B.ITEMTYPEPK,
        B.LANGPK,
        B.PNAME,
        B.PDESCRIPTION,
        B.PMANUFACTURERTYPEDESCRIPTION,
        B.PSEGMENT,
        B.PARTICLESTATUS,
        B.PSUMMARY,
        B.PSTYLE,
        B.PSIZE,
        B.PCOLOR
    FROM "b2c_accCache".PRODUCTSLP B
        /* "b2c_accCache"."PRIMARY": ITEMPK = A.PK */
    WHERE (A.PCODE = '100124')
        AND (A.PK = B.ITEMPK)) [type=ConditionExists]
	at
org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:806)
	at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:647)
	... 1 more
Caused by: class org.apache.ignite.IgniteCheckedException: Unsupported
expression: EXISTS(
    SELECT
        B._KEY,
        B._VAL,
        B.ITEMPK,
        B.ITEMTYPEPK,
        B.LANGPK,
        B.PNAME,
        B.PDESCRIPTION,
        B.PMANUFACTURERTYPEDESCRIPTION,
        B.PSEGMENT,
        B.PARTICLESTATUS,
        B.PSUMMARY,
        B.PSTYLE,
        B.PSIZE,
        B.PCOLOR
    FROM "b2c_accCache".PRODUCTSLP B
        /* "b2c_accCache"."PRIMARY": ITEMPK = A.PK */
    WHERE (A.PCODE = '100124')
        AND (A.PK = B.ITEMPK)) [type=ConditionExists]
	at
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1782)
	at
org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:799)
	... 2 more
Caused by: class org.apache.ignite.IgniteException: Unsupported expression:
EXISTS(
    SELECT
        B._KEY,
        B._VAL,
        B.ITEMPK,
        B.ITEMTYPEPK,
        B.LANGPK,
        B.PNAME,
        B.PDESCRIPTION,
        B.PMANUFACTURERTYPEDESCRIPTION,
        B.PSEGMENT,
        B.PARTICLESTATUS,
        B.PSUMMARY,
        B.PSTYLE,
        B.PSIZE,
        B.PCOLOR
    FROM "b2c_accCache".PRODUCTSLP B
        /* "b2c_accCache"."PRIMARY": ITEMPK = A.PK */
    WHERE (A.PCODE = '100124')
        AND (A.PK = B.ITEMPK)) [type=ConditionExists]
	at
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parseExpression0(GridSqlQueryParser.java:648)
	at
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parseExpression(GridSqlQueryParser.java:421)
	at
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parse(GridSqlQueryParser.java:301)
	at
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parse(GridSqlQueryParser.java:372)
	at
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parse(GridSqlQueryParser.java:244)
	at
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split(GridSqlQuerySplitter.java:153)
	at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:1055)
	at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:801)
	at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:799)
	at
org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
	at
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1764)
	... 3 more



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ignite-not-support-expression-EXISTS-tp3711.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: ignite not support expression: EXISTS?

Posted by Sergi Vladykin <se...@gmail.com>.
Hi,

It looks like a bug, we'll try to fix it asap.
Here is Jira issue to track:
https://issues.apache.org/jira/browse/IGNITE-2913

Sergi

2016-03-30 5:34 GMT+03:00 minisoft_rm <mi...@hotmail.com>:

> dear experts, still no response for this question. So I guess ignite
> currently doesn't support the "EXISTS".
> do we have any plan or jira# to track it so that we could implement it in a
> later version?
>
> thanks ~~
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/ignite-not-support-expression-EXISTS-tp3711p3755.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: ignite not support expression: EXISTS?

Posted by minisoft_rm <mi...@hotmail.com>.
dear experts, still no response for this question. So I guess ignite
currently doesn't support the "EXISTS".
do we have any plan or jira# to track it so that we could implement it in a
later version?

thanks ~~



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ignite-not-support-expression-EXISTS-tp3711p3755.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: ignite not support expression: EXISTS?

Posted by minisoft_rm <mi...@hotmail.com>.
I would like to append more details now .... 

I realised there are two ways to query cache data:
1. by SqlFieldsQuery related approach
2. by "org.apache.ignite.IgniteJdbcDriver", which could give us standard
ResultSet, it is really cool. so that we could treat ignite as a real
in-memory DB, please correct me...


BUT, why not support "EXISTS" clause... ;-(......??



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ignite-not-support-expression-EXISTS-tp3711p3730.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.