1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-29 03:22:01 +03:00
Files
mariadb-columnstore-engine/utils/udfsdk/docs/source/reference/UDAFMap.rst
2018-06-05 13:54:17 -05:00

37 lines
892 B
ReStructuredText

.. _udafmap:
UDAFMap
=======
The UDAFMap is where we tell the system about our function. For Columnstore 1.2, you must manually place your function into this map.
* open mcsv1_udaf.cpp
* add your header to the #include list
* add a new line to the UDAFMap::getMap() function
::
#include "allnull.h"
#include "ssq.h"
#include "median.h"
#include "avg_mode.h"
UDAF_MAP& UDAFMap::getMap()
{
if (fm.size() > 0)
{
return fm;
}
// first: function name
// second: Function pointer
// please use lower case for the function name. Because the names might be
// case-insensitive in MySQL depending on the setting. In such case,
// the function names passed to the interface is always in lower case.
fm["allnull"] = new allnull();
fm["ssq"] = new ssq();
fm["median"] = new median();
fm["avg_mode"] = new avg_mode();
return fm;
}