Download Sample Source Code

To download the sample source code and build scripts, issue the following command:
git clone https://github.com/mapr/impala-udf-samples

The following table provides the source code file names and their descriptions:

File Name Description
udf-sample.h Header file that declares the signature for a scalar UDF.
udf-sample.cc Sample source for a simple UDF that adds two integers.
udf-sample-test.cc Basic unit tests for the sample UDF.
uda-sample.h Header file that declares signature for sample aggregate functions.
uda-sample.cc Sample source for simple UDAFs that show how to manage state transitions as underlying are called during various phases of query processing.
uda-sample-test.cc Basic unit tests for the sample UDAFs.