Scalar Function and Scalar Function Factory Python Interface

This section describes information that is specific to the Python API. See UDSF Class Overview for general information about implementing the ScalarFunction and ScalarFunctionFactory classes.

ScalarFunction API

The API provides the following methods for extension by subclasses:

class python_udx(vertica_sdk.ScalarFunctionFactory):

    def __init__(self):
        pass
    def setup(self, server_interface, col_types):
        pass
    def processBlock(self, server_interface, block_reader, block_writer):
        pass
    def destroy(self, server_interface, col_types):
        pass

ScalarFunctionFactory API

The API provides the following methods for extension by subclasses:

class python_udx_factory(vertica_sdk.ScalarFunctionFactory):

    def createScalarFunction(self, srv):
        pass
    def getPrototype(self, srv_interface, arg_types, return_type):
        pass
    def getReturnType(self, srv_interface, arg_types, return_type):
        pass