Skip to main content

Exception while registering UDAF with overridden getParameterType method

  • August 15, 2016
  • 0 replies
  • 3 views

TheUnknownGuy

Hi,

 

I am trying to write a custome UDAF with 2 params.

I want to use one of the parameter to decide the size of a varibale used inside.

 

Here is the code I have written.

 

virtual void getParameterType(ServerInterface &srvInterface,SizedColumnTypes &parameterTypes)
{
   Vertica::UDXFactory::getParameterType(srvInterface,parameterTypes);
   try{
       std::size_t N = 1;
       parameterTypes.getColumnType(N);
     } catch(exception& e) {
        vt_report_error(0, "Exception during compile: [%s]", e.what());
    }
}

 

 

This compiles fine but while trying to register, I get this error- 

 

ROLLBACK 5861: Error calling getParameterType() in User Function hll_count at [../src/c++/HLLRegisterRollUpUDAF.cpp:198], error code: 0, message: Exception during compile: [vector:lithiumM_range_check]

 

Any help is appriciated. 

 

Thanks