Hi,
I am trying to do an explain analysis on an SQL statement:
SqlFieldsQuery sql = new SqlFieldsQuery(
" explain SELECT act.id as id, act.actDef as actDef,
act.status,
act.prio as prio, o.orgId, p.userId "
+ " FROM Activity as act left join Orga as o on
act.id = o.actId
left join Person as p on act.id = p.actId "
+ " WHERE act.prio = 1 and p.userId = 1 and
o.orgId in (1, 2,
3, 4, 5, 6, 7)
+ " ORDER BY actDef FETCH FIRST 101 ROWS ONLY", true);
for(int i = 0; i < 5; i++)
try (FieldsQueryCursor<List<?>> joinCursor =
taskCache.query(sql)) {
for (List<?> row : joinCursor){
System.out.println("Activity data = " + row.get(0) + "&
orga = " + row.get(4) + " " + row.get(1) + " " + row.get(2));
System.out.println("Activity data = " + row.get(0);
...
Unfortunately, an Exception from the resulting list is thrown.
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 4,
Size: 1
at java.util.Collections$SingletonList.get(Collections.java:4815)
at
com.example.demo.DemoIgniteApplication.main(DemoIgniteApplication.java:489)
The program runs fine if the explain command is removed.
What can I do to continue my analysis?
Regards
Desiree
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/