[MonetDB-users] User-defined MAL functions
Hi, I have some questions about using user-defined MAL functions
I would like to create a function in MAL. 1) Is it possible that the function can take variable number of BATs as argument like in the case of algebra.joinPath(l:bat[:any,:any]... ) ? 2) If yes, how I can get the number of BATs passed as argument and 3) how I can get the n-th element of the argument?
Thank you in advance Petros
On 3/22/11 1:02 PM, Petros Tsialiamanis wrote:
Hi, I have some questions about using user-defined MAL functions
I would like to create a function in MAL.
- Is it possible that the function can take variable number of BATs as argument like in the case of algebra.joinPath(l:bat[:any,:any]... ) ?
Yes, define it as a pattern, which gives you full control over the structure.
- If yes, how I can get the number of BATs passed as argument and
p->argc- p->retc, look at the implementation of joinPath for inspiration.
- how I can get the n-th element of the argument?
getArg(p,k) gives you the index for lookup in the stackframe.
regards,Martin
Thank you in advance Petros
Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar
MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
participants (2)
-
Martin Kersten
-
Petros Tsialiamanis