ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Scherbakov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-6203) Valid query cannot be processed.
Date Mon, 28 Aug 2017 13:53:00 GMT
Alexei Scherbakov created IGNITE-6203:
-----------------------------------------

             Summary: Valid query cannot be processed.
                 Key: IGNITE-6203
                 URL: https://issues.apache.org/jira/browse/IGNITE-6203
             Project: Ignite
          Issue Type: Bug
    Affects Versions: 2.1
            Reporter: Alexei Scherbakov
             Fix For: 2.3


Query: select * from Integer where _KEY=? and false
Exception:
{noformat}
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to bind parameter [idx=1,
obj=1, stmt=prep4: SELECT
__Z0._KEY,
__Z0._VAL
FROM "default".INTEGER __Z0
WHERE FALSE]
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.bindObject(IgniteH2Indexing.java:515)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.bindParameters(IgniteH2Indexing.java:1048)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.optimize(GridSqlQuerySplitter.java:1628)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split(GridSqlQuerySplitter.java:220)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1336)
	... 18 more
Caused by: org.h2.jdbc.JdbcSQLException: Invalid value "1" for parameter "parameterIndex"
[90008-195]
...
{noformat}


{noformat}
public void test() throws Exception {
        try {
            Ignite ignite = startGrid();

            SqlFieldsQuery qry = new SqlFieldsQuery("select * from Integer where _KEY=? and
false");

            qry.setArgs(1);

            FieldsQueryCursor<List<?>> query = ignite.cache(DEFAULT_CACHE_NAME).query(qry);

            System.out.println(query.getAll());
        } finally {
            stopAllGrids();
        }
    }
{noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message