add_attributes

add_attributes is a DDL operator that adds one or more attributes to an existing array.

Synopsis

add_attributes( array, schema_definition );

Summary

This operator allows the user to add additional attributes to an array f in-place without creating a new copy of f.

Add Attribute

AFL% store(build(<z:uint64>[i=0:0:0:1],i),f);
AFL% add_attributes(f, <y:int64>);
AFL% scan(a);
{i} z,y
{0} 0,null

This will populate the newly created attribute y on array f with null.

Add Attribute with Default Value

AFL% store(build(<z:uint64>[i=0:0:0:1],i),f);
AFL% add_attributes(f, <y:int64 default 32768>);
AFL% scan(f);
{i} z,y
{0} 0,31768

This will populate the newly created attribute y on array f with the default value 32768.