You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-12-24 14:20:59 +03:00
MCOL-523 documentation part 3
This commit is contained in:
@@ -72,9 +72,9 @@ In the MEDIAN UDAF, it works like this:
|
||||
|
||||
Notice that the data is to be stored in a std::map container.
|
||||
|
||||
The serialize method leverages Columnstore's ByteStream class (in namespace messageqcpp). This is not optional. The serialize and unserialize methods are each passed an reference to a ByteStream. The framework expects the data to be streamed into the ByteStream by serialize and streamed back into your data struct by unserialize. See the chapter on ByteStream for more information.
|
||||
The serialize method leverages Columnstore's :ref:`ByteStream <bytestream>` class (in namespace messageqcpp). This is not optional. The serialize and unserialize methods are each passed an reference to a :ref:`ByteStream <bytestream>`. The framework expects the data to be streamed into the :ref:`ByteStream <bytestream>` by serialize and streamed back into your data struct by unserialize. See the chapter on :ref:`ByteStream <bytestream>` for more information.
|
||||
|
||||
For MEDIAN, serialize() iterates over the set and streams the values to the ByteStream and unserialze unstreams them back into the set:
|
||||
For MEDIAN, serialize() iterates over the set and streams the values to the :ref:`ByteStream <bytestream>` and unserialze unstreams them back into the set:
|
||||
|
||||
.. literalinclude:: ../../../median.cpp
|
||||
:lines: 290-305
|
||||
@@ -82,7 +82,7 @@ For MEDIAN, serialize() iterates over the set and streams the values to the Byte
|
||||
|
||||
.. rubric:: createUserData()
|
||||
|
||||
The createUserData() method() has two parameters, a pointer reference to userData, and a length. Both of these are [OUT] parameters.
|
||||
The :ref:`createUserData() <createuserdata>` method() has two parameters, a pointer reference to userData, and a length. Both of these are [OUT] parameters.
|
||||
|
||||
The userData parameter is to be set to an instance of your new data structure.
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ You may only need a few accunulators and counters. These can be represented as a
|
||||
If you have a more complex data structure that may have varying size, you must use :ref:`complexdatamodel`. This should be defined in the header. Here's a struct for MEDIAN example from median.h:
|
||||
|
||||
.. literalinclude:: ../../../median.h
|
||||
:lines: 84-97
|
||||
:lines: 80-97
|
||||
:language: cpp
|
||||
|
||||
In each of the functions that have a context parameter, you should type cast the data member of context's UserData member::
|
||||
|
||||
Reference in New Issue
Block a user