Error when my operator taking result from other operators


#1

If the input arrays for my operator are already stored the operator works perfectly fine, but it fails when the input array are generated by other operators:

Op(A, B);
// Works fine
Op(A, scan(B) );
// Works fine
Op(A, filter(B, i<10) );
UserException in file: src/array/Array.cpp function: getIterator line: 874
Error id: scidb::SCIDB_SE_INTERNAL::SCIDB_LE_ILLEGAL_OPERATION
Error description: Internal SciDB error. Illegal operation: Array::getIterator.
Op(A, project(B, v) );
UserException in file: src/array/Array.cpp function: getIterator line: 874
Error id: scidb::SCIDB_SE_INTERNAL::SCIDB_LE_ILLEGAL_OPERATION
Error description: Internal SciDB error. Illegal operation: Array::getIterator.

Any idea how I can solve this?


#2

I found the solution.
If input array is stored array, it’s internally a DBArray, but if input array is generated by other operator, it’s internally a MaterializedArray and doesn’t have getIterator() implemented.

The solution is simply replace it with getConstIterator()