1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-24 14:20:59 +03:00

MCOL-2180 Update UDAF docs

This commit is contained in:
David Hall
2019-03-06 11:52:01 -06:00
parent e849af0ce6
commit 5dff25e0a0
6 changed files with 93 additions and 3 deletions

View File

@@ -34,3 +34,24 @@ The UDAFMap is where we tell the system about our function. For Columnstore 1.2,
return fm;
}
An alternative method added for 1.2 is to put the following in your .cpp file.
replace "median" with the name of your function:
::
class Add_median_ToUDAFMap
{
public:
Add_median_ToUDAFMap()
{
UDAFMap::getMap()["median"] = new median();
}
};
static Add_median_ToUDAFMap addToMap;
This defines an object whose constructor adds the entry to the UDAFMap. The
static declaration instatiates an object at runtime, thus adding the entry
at startup.