[Monetdb-developers] Why has a BAT no more the same order after a bat.delete(...)

Simon Berther s.berther at access.unizh.ch
Tue Jul 1 17:44:56 CEST 2008


Hello,

I'm developing in MAL accessing commands and functions from C++ over the 
MAPI-library.

My task is to delete some BUNs from a BAT.

The problem: The BAT with some deleted BUNs has a different order than 
before.

I do it the following way:

c:bat[:oid,:int] := bbp.bind("joe");
slice:bat[:oid,:int] := algebra.slice(c,4,6);
bat.delete(c,slice);

The original BAT "joe":
#-----------------#
# h    t          # name
# oid  int        # type
#-----------------#
[ 0 at 0,      -1    ]
[ 1 at 0,      2     ]
[ 2 at 0,      3     ]
[ 3 at 0,      -1    ]
[ 4 at 0,      -2    ] <- to be deleted
[ 5 at 0,      5     ] <- to be deleted
[ 6 at 0,      -2    ] <- to be deleted

After delete:
The original BAT "joe":
#-----------------#
# h    t          # name
# oid  int        # type
#-----------------#
[ 3 at 0,      -1    ] <- not in right order, why?
[ 0 at 0,      -1    ]
[ 1 at 0,      2     ]
[ 2 at 0,      3     ]

Why is this so and how can I prevent MonetDB to change the order, while 
deleting BUNs.
The order is important, because I'd like to work with position and 
slices to read my BUNs.

Thanks for helping!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20080701/e7f8ac40/attachment.html>


More information about the developers-list mailing list