On Wed, Dec 21, 2005 at 09:31:43PM +0100, Arjen P. de Vries wrote:
Note that the void type has more hidden semantics that are not yet mentioned in behaviours 1 and 2...
Some people use/have used insert(nil) meaning to say insert(lastoid++) - For example:
MonetDB>var a := new(oid,void); MonetDB>a.insert(oid(0),nil); MonetDB>a.print(); #-----------------# # h t # name # oid void # type #-----------------# [ 0@0, nil ] MonetDB>a.reverse().seqbase(oid(0)); MonetDB>a.print(); #-----------------# # h t # name # oid void # type #-----------------# [ 0@0, 0@0 ] MonetDB>a.insert(oid(1),nil); MonetDB>a.print(); #-----------------# # h t # name # oid void # type #-----------------# [ 0@0, 0@0 ] [ 1@0, 1@0 ]
Note that this latter result is inconsistent with the decision for option 2!! (while it is consistent with that of option 1 - seqbase is nil!)
| Note that this solution also means that when you insert a non-nil value | into a nil column, the column should get materialized as well (this is | currently not the case):
BTW, in principle nil-values could be represented in other ways to avoid materialisation - e.g., a bit-vector, or a list of all nil-values; this may be interesting alternatives when columns contain only a small number of nil values (though affecting all current operators of course).
but the way we will go with X100 ;-)
Arjen
| | mil>var a := new(oid,void).insert(0@0,nil); | mil>a.print(); | #-----------------# | # h t # name | # oid void # type | #-----------------# | [ 0@0, nil ] | mil>a.insert(1@0,1@0); | mil>a.print(); | #-----------------# | # h t # name | # oid oid # type | #-----------------# | [ 0@0, nil ] | [ 1@0, 1@0 ]
------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
-- Niels Nes, Centre for Mathematics and Computer Science (CWI) Kruislaan 413, 1098 SJ Amsterdam, The Netherlands room C0.02, phone ++31 20 592-4098, fax ++31 20 592-4312 url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl