When trying out the OLAP4J Introduction v1.0 (apr 2011) example listing for
"Iterating over results" on page 16 using OLAP4J 184.108.40.2063 with Mondrian
3.4.2, the following line fails:
3: Cell currentCell = results2.getCell( axis_0, axis_1 );
java.lang.IndexOutOfBoundsException: Cell coordinates (0, 1) fall outside CellSet bounds (3, 1)
However, switching the axes succeeds:
3: Cell currentCell = results2.getCell( axis_1, axis_0 );
argument ordering of
supposed to be figured out by OLAP4J and thus axis-independent?
The API doesn't specify whether CellSet.getCell(Position...) should expect the
positions to be in a particular order. I think you are right -- it is
reasonable to expect that the call should work if the positions are in any
order, as long as the caller provides one for each axis.
Can you please log a bug for this? Log it against olap4j, then we will add it
to the TCK, and that will make sure that all drivers implement this
I have logged bug 3532252.
Log in to post a comment.