Error after compiling monetdb

Shmagi Kavtaradze kavtaradze.s at
Sat Mar 19 00:27:30 CET 2016

I am trying to write a C User Defined Function. It works in Neatbeans. What
I want is, to take value from cells, insert them in text or char array and
compare each corresponding array position to each other. As values I will
have "1"s and "0s". E.g "101010100011". THe code I wrote in udf.c:

/* Comparing bag of words */

BitAnd(char Cell1[], char Cell2[])
int counter;
float result;
int strlen = sizeof(Cell1)/sizeof(Cell1[0])-1;
int i;
for (i=0; i < strlen; i++) {
    if (Cell1[i] == Cell2[i]) {

result = (float)counter / strlen;


/* MAL wrapper */
UDFBitAnd(char Cell1[], char Cell2[])
/* assert calling sanity */
assert(Cell1[] != NULL && Cell2[] != NULL);


In udf.mal I have:

command BitAnd(Cell1:chr,Cell2:chr):flt
address UDFBitAnd
comment "Compare bag of words";

In 80_udf.sql:

-- Comparing bag of words
create function BitAnd(Cell1[] char, Cell2[] char)
returns float external name udf.BitAnd;

I compiled Monetdb, but when I try to connect with "monetdb" to db it gives
me error. In the log file I found:

MSG voc[18857]: !SyntaxException:parseError:command
MSG voc[18857]: !SyntaxException:parseError:                    ^Type
identifier expected
MSG voc[18857]: !SyntaxException:parseError:command
MSG voc[18857]: !SyntaxException:parseError:
    ^',' expected
MSG merovingian[8780]: database 'voc' (18857) has exited with exit status 0
MSG merovingian[8780]: database 'voc' has shut down
ERR merovingian[8780]: client error: database 'voc' started up, but failed
to open up a communication channel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the developers-list mailing list