Hi
AM using 2.4
My delete statement is failing when I pass multiple keys, table has a
composite key with 3 columns.
Have mentioned the table structure along with a failed query and successful
query and the error I am seeing the
Here is the table created Java API
CREATE TABLE MapLonglistCache.MAP_LONGLIST (
ENTITY_ID VARCHAR,
MAPPING_ID_LIST VARCHAR,
RELATIONSHIP VARCHAR,
UPDATEDDATETIME TIMESTAMP,
UPDATEDBY VARCHAR,
SEQUENCE_NO VARCHAR,
TUPLE_COUNT VARCHAR,
CONSTRAINT PK_MapLonglistCache_MAP_LONGLIST PRIMARY KEY
(ENTITY_ID,RELATIONSHIP,SEQUENCE_NO)
) ;
CREATE INDEX MAP_LONGLIST_PK ON MapLonglistCache.MAP_LONGLIST (RELATIONSHIP
DESC,SEQUENCE_NO DESC) ;
Here is query which is failing
DELETE FROM "MapLonglistCache".MAP_LONGLIST WHERE ENTITY_ID IN
('12345','12345')
AND RELATIONSHIP IN ('OutageID_ServiceIDs','OutageID_ServiceIDs')
AND SEQUENCE_NO IN ('6','7')
And, when I pass only one key, it seems to be working like
DELETE FROM "MapLonglistCache".MAP_LONGLIST WHERE ENTITY_ID IN ('12345')
AND RELATIONSHIP IN ('OutageID_ServiceIDs')
AND SEQUENCE_NO IN ('6')
So is it, that delete will not work with IN clause which has a composite
key.
And I do not have POJO classes on the classpath, not sure how it is trying
load the key class "'com.jio.digitalapi.edif.customer.model.MapLonglistKey"
SEVERE: Failed to execute SQL query [reqId=0, req=JdbcQueryExecuteRequest
[schemaName=PUBLIC, pageSize=1024, maxRows=0, sqlQry=DELETE FROM
"MapLonglistCache".MAP_LONGLIST WHERE ENTITY_ID IN ('12345','12345')
AND RELATIONSHIP IN ('OutageID_ServiceIDs','OutageID_ServiceIDs')
AND SEQUENCE_NO IN ('6','7'), args=[], stmtType=ANY_STATEMENT_TYPE]]
class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed
to process key 'com.jio.digitalapi.edif.customer.model.MapLonglistKey
[idHash=15804671, hash=156851519, entityId=12345,
relationship=OutageID_ServiceIDs, sequenceNo=7]'
at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.doDelete(DmlStatementsProcessor.java:681)
at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.processDmlSelectResult(DmlStatementsProcessor.java:582)
at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:534)
at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:160)
at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsDistributed(DmlStatementsProcessor.java:334)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.doRunPrepared(IgniteH2Indexing.java:1613)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1577)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2039)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2034)
at
org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2555)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2048)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:1979)
at
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:310)
at
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:169)
at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:148)
at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:41)
at
org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
at
org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
at
org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at
org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: Failed to process key
'com.jio.digitalapi.edif.customer.model.MapLonglistKey [idHash=15804671,
hash=156851519, entityId=12345, relationship=OutageID_