Sparse loads not working?


#1

In going through the examples like in one of the previous comments, I was unable to get sparse loads to work. This might be what the previous post had found too, but I have a bit more information to add. First, the documentation around Example_One might be a little off. In Section 1 the array is defined as
CREATE ARRAY Example_One < Val: int32 > [ X=0:49,10,0, Y=0:49,10,0]
but then in Section 2 it is:
The following illustrates sparse array data loading. Recalling Example_One from above.

CREATE ARRAY Example_One < Val: int32 > [ X=0:99,100,0, Y=0:99,100,0]"

(note the words “Recalling” which made me think should be the same array)
Then the example data has 25 chunks which is consistent with the first definition and not the second (if I am understanding it all correctly).

The sample data itself seems to have a typo in the first line, the extra “[”, but when I removed that, the data has dimensions corresponding to the 2nd example but chunks like the first. I played with the data to make it consistent with the first definition (25 chunks) because that is what I wanted to see working, and then I would still get errors of " Wrong number of elements: coord[0] == Coordinate(dims[0].getStart() + dims[0].getLength() -1) ". Note here - a Junit style output of “expected [] but was []” would be helpful.

It is certainly possibly that there is something I am doing wrong, but then I tried to run the data from tests/basic/data/xyz_small.txt into an array created with the line from load.021.aql and I got Chunk with such address already exists… errors. which I also saw along the way while playing with Example_One.

I stopped short of hooking it up to gdb at this point, to see if I am missing something.


#2

Scott,

The documentation example for loading sparse data does look wrong. We will update the documentation with some changes. One of us will post a pointer to the updated documentation.

However, the example in tests/basic/create/load.020.aql is correct. Most likely the error you are seeing is because you are trying to load a previously loaded array. Try to remove the array and reload the data on your scidb server.

Thanks for pointing this out.

Suchi


#3

This is now fixed in the R 0.5 AIL documentation.
trac.scidb.org/wiki/PrivateArea/ … Array-load