Hello everyone,

I have successfully created a UDF based on the example code shown in the 
udf_example.cc (1) file.  However, I have not been able to access a custom 
options object from the KernelContext object passed to the UDF. The example 
compute_register_example.cc (2) code shows how to create a custom options 
class, but it does not include any data members nor show how to access the 
object.

I have browsed through the cpp/src/arrow/compute tree to see how the internal 
functions do it, but they seem to use some inaccessible internal functions to 
access the options. The registry_test.cc (3) shows how to create and register 
the FunctionOptionsType, but it does not explain why one would do so, nor the 
relationship between the FunctionOptions and the FunctionOptionsType.

If I could get a simple example of how to create and access custom options from 
with a UDF, I would greatly appreciate it.

Regards,
Douglas

1. https://github.com/apache/arrow/blob/master/cpp/examples/arrow/udf_example.cc
2. 
https://github.com/apache/arrow/blob/master/cpp/examples/arrow/compute_register_example.cc
3. 
https://github.com/apache/arrow/blob/master/cpp/src/arrow/compute/registry_test.cc

Reply via email to