Bug? Redimension fails if dimension name is array name



Took a while to figure out why redimension failed in some cases.

This simple redimension works ok:

create array foo <value:double>[x=0:2,100,0, y=0:4,100,0];
store(build(foo, x+y), foo);
redimension(foo, foo);

But if I replace “x” with “foo”, the redimension fails with the following error:

create array foo <value:double>[foo=0:2,100,0, y=0:4,100,0];
store(build(foo, foo+y), foo);
redimension(foo, foo);

[color=#BF0040]UserException in file: src/array/Metadata.cpp function: addAttribute line: 545
Error description: Metadata error. Cannot create attribute ‘value’; name collides with existing object.[/color]

Should this work, or should we avoid using same names in arrays and dimensions?



This should work. It’s a bug in SciDB and I’ll file a ticket on this.

Note that the redimension(foo,foo) doesn’t have any effect; I gather you’re using it here to illustrate this bug.