Hi,
I have three BATs and I would like to create groups of pairs from the
first two BATs and take the bitwise and for the tail values of each
group according to the third BAT. I saw that there is a module for
grouping operations in monetdb5/modules/kernel/group.mx. Is it the
right one for my purpose? For the case of bitwise and is there any
function that I could use or I should write my own like for example
the GRPaggr_count() function in that file.
Thanks,
Babis
Where can I learn more about mx files?
In particular, in the following code, it looks like @2 is derived from the
type expands this into a multitude of type specific functions. I can't
figure out what @3 is. Is there a list of these?
SORTfndlast_@2(BAT *b, ptr v)
{
BUN diff, end = BUNlast(b), cur = end;
BUN lo = BUNfirst(b), hi = end;
int cmp = 1;
BATiter bi = bat_iterator(b);
if (lo >= hi || @3_CMP(BUNt@1(bi, cur - 1), v, @4)<=0) {
/* shortcut: if BAT is empty or last (and hence all) tail
* value is <= v, we're done. */
return cur;
}
while (lo < hi) {
BUN mid = (lo + hi) >> 1;
cur = mid;
cmp = @3_CMP(BUNt@1(bi, cur), v, @4);
if (cmp < 0) {
lo = ++mid;
cur++;
} else if (cmp > 0) {
hi = mid;
} else {
break;
}
}
if (cmp == 0 && b->tkey == 0) { /* shift over multiple equals */
for(diff = (end-cur)>>1; diff; diff >>= 1) {
while ((cur+diff) < end && @3_EQ(BUNt@1(bi, cur+diff), v, @4)) cur +=
diff;
}
}
if (cmp == 0) cur++;
return cur;
}
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
In some fields the usage of 32 or 36 hours in a day are common. The
extra time after midnight is used to indicate that a certain operation
is linear in time. My particular use case is public transport.
Is there any other way that using TIMESTAMP to get the 'features' of
TIME, but than in a 32h or 36h day?
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEAREKAAYFAk7pYboACgkQYH1+F2Rqwn3CQgCfU0CCgnJgxJj0lFW9RC+qiyz+
Pj0An1Vn8oZETQTCCeIFv+LgWOAx7ERQ
=wSgl
-----END PGP SIGNATURE-----
Hi,
in Ubuntu 10.04 (as far as I remember it happens in other releases
too) monetdbd takes about 10 seconds to start as opposed to mac os x
10.6 and 10.7 in which it starts instantaneously. Inspecting
connections.c, the delay is due to the call on gethostbyaddr().
Reading the respective man page, getting the hostname involves a
number of steps ranging from looking at /etc/hosts.conf, /etc/hosts,
as well as consulting named for resolving the ip address. What's more,
the man page states explicitly that gethostbyaddr() is obsolete and
suggests the use of getnameinfo() instead. Correspondingly, the man
page in os x recommends the use of getnameinfo() as well, but without
stating any explanation for this.
Have you investigated this issue? Do you know what causes such a
delay? Is it present in other OSs too?
Thanks,
Babis
Hi,
I've read in the docs that one of the planned future features of monetdb
will be 'support for 3D types'.
- Do you mean full 3D support or 2.5D ?
- Will be these 3D spatial extensions also integrated in sciQL?
- Have you scheduled this feature release?
Thanks in advance for any answer.
Luca Paganotti
Hello,
considering the following interaction
$ mclient -lmal -d test
Welcome to mclient, the MonetDB interactive terminal (unreleased)
Type \q to quit, \? for a list of available commands
mal>sql.init();
mal>_mvc := sql.mvc();
mal>abat:bat[:int,:int] := bat.new(:int, :int);
mal>bat.insert(abat, 1, 4);
mal>bat.insert(abat, 1, 4);
mal>bat.insert(abat, 1, 1);
mal>bat.insert(abat, 1, 1);
mal>bat.insert(abat, 0, 4);
mal>bat.inplace(abat, 0, 5);
MAPI = (monetdb) /tmp/.s.monetdb.50000
ACTION= read_line
QUERY = bat.inplace(abat, 0, 5);
ERROR = !Connection terminated
Is this a bug or not?
The log of merovingian is the following:
2011-12-07 13:01:51 ERR test[15564]: mserver5:
../../MonetDB/gdk/gdk_bat.mx:1917: void_inplace: Assertion `b->H->type
== 0' failed.
2011-12-07 13:01:51 MSG merovingian[14343]: database 'test' (15564)
was killed by signal SIGABRT
However, the bat5.mx declares the following prototype:
command inplace( o:bat[:any_1,:any_2], id:any_1, t:any_2) :bat[:any_1,:any_2]
address BKCbun_inplace
comment "inplace replace values on the given locations";
Regards,
Babis