We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Polymorphic Functions in R UDF — Vertica Forum

Polymorphic Functions in R UDF

I have been trying to use the polymorphic functions in R UDF. I have tried it as follows:
  testingCrosstab <- function(x)  {       var1 <- x[,1]    var2 <- x[,2]    crossTab <- as.data.frame.matrix(table(var1,var2))    crossTab  }    testingCrosstab_factory <- function()  {    outlist <- c("int","int")    list(name=testingCrosstab, udxtype=c("transform"), intype=c("any"), outtype=outlist)  }  
However, when I try creating a transform function as follows:
  CREATE TRANSFORM FUNCTION testingCrosstab AS NAME 'testingCrosstab_factory' LIBRARY crossTabTest ;  
This throws the following error: ROLLBACK 3399: Failure in UDx RPC call InvokeGetPrototype(): Error calling getPrototype() in User Defined Object [testingCrosstab] at [vertica-udx-R.cpp:169], error code: 0, message: Error happened in getPrototype : Exception in getColType(): Unsupported data type : any Is the option "any" not supported anymore in R UDFs? Thank you. Ravi

Comments

  • Hi vioravis, I will do some testing on my side and let you know what I find. Thanks Bhawana
  • Hi Vioravis, It is supported in 6.1, what version of the software are you using? Thanks Bhawana

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file