[Monetdb-developers] what should happen when appending to a nil bat?

Sjoerd Mullender sjoerd at acm.org
Wed Dec 21 13:08:26 CET 2005


Consider this scenario:
mil>var a := new(oid,void).insert(0 at 0,nil);
mil>a.print();
#-----------------#
# h     t         # name
# oid   void      # type
#-----------------#
[ 0 at 0,    nil     ]
mil>var b := new(oid,oid).insert(0 at 0,1 at 0);
mil>b.print();
#-----------------#
# h     t         # name
# oid   oid       # type
#-----------------#
[ 0 at 0,    1 at 0     ]
mil>a.append(b);
mil>a.print();

The question is, what should the result be?

As I see it, there are two possibilities:
#-----------------#
# h     t         # name
# oid   void      # type
#-----------------#
[ 0 at 0,    nil     ]
[ 1 at 0,    nil     ]
or
#-----------------#
# h     t         # name
# oid   oid       # type
#-----------------#
[ 0 at 0,    nil     ]
[ 1 at 0,    1 at 0     ]

The former keeps the nil tail (the tail of a was void without seqbase
and stays that way), whereas the latter materializes the tail so that
the tail value of b gets inserted.

Opinions?

-- 
Sjoerd Mullender
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 369 bytes
Desc: OpenPGP digital signature
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20051221/1a70ec08/attachment.sig>


More information about the developers-list mailing list