diff --git a/utils/udfsdk/docs/build/latex/UDAF.pdf b/utils/udfsdk/docs/build/latex/UDAF.pdf index 36f93e15f..574a124f6 100644 Binary files a/utils/udfsdk/docs/build/latex/UDAF.pdf and b/utils/udfsdk/docs/build/latex/UDAF.pdf differ diff --git a/utils/udfsdk/docs/source/reference/ByteStream.rst b/utils/udfsdk/docs/source/reference/ByteStream.rst index de9a07797..99353a386 100644 --- a/utils/udfsdk/docs/source/reference/ByteStream.rst +++ b/utils/udfsdk/docs/source/reference/ByteStream.rst @@ -1,3 +1,5 @@ +.. _bytestream: + ByteStream ========== diff --git a/utils/udfsdk/docs/source/reference/mcsv1_UDAF.rst b/utils/udfsdk/docs/source/reference/mcsv1_UDAF.rst index 2c1513a4f..73c8f6570 100644 --- a/utils/udfsdk/docs/source/reference/mcsv1_UDAF.rst +++ b/utils/udfsdk/docs/source/reference/mcsv1_UDAF.rst @@ -1,3 +1,5 @@ +.. _ mcsv1_udaf: + mcsv1_UDAF ========== @@ -76,6 +78,8 @@ Destructor Callback Methods ---------------- +.. _init: + .. c:function:: ReturnCode init(mcsv1Context* context, COL_TYPES& colTypes); :param context: The context object for this call. @@ -98,6 +102,8 @@ Callback Methods All flags, return type, Window Frame, etc. set in the context object here will be propogated to any copies made and will be streamed to the various modules. You are guaranteed that these settings will be correct for each callback. +.. _reset: + .. c:function:: ReturnCode reset(mcsv1Context* context); :param context: The context object for this call. @@ -108,6 +114,8 @@ Callback Methods Use context->getUserData() and type cast it to your UserData type or Simple Data Model stuct. +.. _nextvalue: + .. c:function:: ReturnCode nextValue(mcsv1Context* context, std::vector& valsIn); :param context: The context object for this call @@ -128,6 +136,8 @@ Callback Methods Since this is called for every row, it is important that this method be efficient. +.. _subevaluate: + .. c:function:: ReturnCode subEvaluate(mcsv1Context* context, const UserData* userDataIn); :param context: The context object for this call @@ -142,6 +152,8 @@ Callback Methods Each call to subEvaluate should aggregate the values from userDataIn into the context's UserData struct. +.. _evaluate: + .. c:function:: ReturnCode evaluate(mcsv1Context* context, static_any::any& valOut); :param context: The context object for this call @@ -158,6 +170,8 @@ Callback Methods Set your aggregated value into valOut. The type you set should be compatible with the type defined in the context's result type. The framework will do it's best to do any conversions if required. +.. _dropvalue: + .. c:function:: ReturnCode dropValue(mcsv1Context* context, std::vector& valsDropped); :param context: The context object for this call @@ -182,6 +196,8 @@ Callback Methods Subtract the value from accumulator decrement row count +.. _createuserdata: + .. c:function:: ReturnCode createUserData(UserData*& userdata, int32_t& length); :param userData [out]: A pointer to be allocated by the function. diff --git a/utils/udfsdk/docs/source/usage/memoryallocation.rst b/utils/udfsdk/docs/source/usage/memoryallocation.rst index 8f94e3f5c..144f2099f 100644 --- a/utils/udfsdk/docs/source/usage/memoryallocation.rst +++ b/utils/udfsdk/docs/source/usage/memoryallocation.rst @@ -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 ` class (in namespace messageqcpp). This is not optional. The serialize and unserialize methods are each passed an reference to a :ref:`ByteStream `. The framework expects the data to be streamed into the :ref:`ByteStream ` by serialize and streamed back into your data struct by unserialize. See the chapter on :ref:`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 ` 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() ` 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. diff --git a/utils/udfsdk/docs/source/usage/sourcefile.rst b/utils/udfsdk/docs/source/usage/sourcefile.rst index 39f11cd7b..b7ed38a32 100644 --- a/utils/udfsdk/docs/source/usage/sourcefile.rst +++ b/utils/udfsdk/docs/source/usage/sourcefile.rst @@ -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::