Error: Dimensions 'i' and 'i' do not match


I have an insert that does not work under AFL but does work under AQL, and I do not understand why. The error message is

A snippet showing schemas would be

AQL% set lang afl;
AFL% list('arrays');
{No} name,id,schema,availability
{0} 'dtw',3757,'dtw<x:double NULL DEFAULT null> [i=0:*,100000,0,j=0:*,100000,0]',true
{1} 'ins',3762,'ins<y:double NULL DEFAULT null> [i=0:10,11,0,j=0:10,11,0]',true
AFL% set no fetch;
AFL% insert(ins,dtw);
UserException in file: src/query/ops/insert/LogicalInsert.cpp function: inferSchema line: 158
Error description: Error during schema inferring. Dimensions 'i' and 'i' do not match.
AFL% set lang aql;
AQL% insert into dtw select * from ins;
Query was executed successfully

I do not know how to interpret the message

Any clarification would be greatly appreciated.



I believe that the AFL insert function is more restrictive about the schema of it’s inputs. From the documentation:

“Inserts all data from left array into the persistent targetArray. targetArray must exist with matching dimensions and attributes.”

So I think the problem is that the ‘i’ dimension of the dtw and ins arrays do not have the same properties (ie they aren’t both ‘i=0:10,11,0’)



Thank you for the Pointer Chris, This allowed me to solve the problem by using the same chunk value.

On the other hand, I was using the document Paradigm4-scidb-userguide-14.7.pdf, chapter 19, page 205 for insert where I read

Could you tell to what document are you referring?


  • Marcus


Hi Marcus,

Sorry – I was looking at the documentation on SciDB-Py, which is in turn extracted from the source code of SciDB: … bpy.insert

I guess this text differs from the user guide.


Hello Chris,

Thanks for the feedkback. SciDB-py is next on my list to read.