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
0
Comments