Bug? Redimension fails if dimension name is array name


#1

Hi,

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 id: scidb::SCIDB_SE_METADATA::SCIDB_LE_DUPLICATE_ATTRIBUTE_NAME
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?

Teemu


#2

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.