7.00.02.01 - Aster R Functions with External C Calls Are Not Uploaded - Aster R

Teradata Aster® R User GuideUpdate 3

prodname
Aster R
vrm_release
7.00.02.01
created_date
December 2017
category
Programming Reference
User Guide
featnum
B700-1033-700K

Aster R input functions that contain external C calls (for example, runif), are not uploaded when using the deparse or the serialize method directly and will return an error. For example:

> ta.eval(runif, 1, FUN.upload = "deparse")
 Error in taQuery(queryStr, stringsAsFactors = FALSE, stopOnError = TRUE) : HY000 34 [AsterData][nCluster] (34) ERROR: SQL-MR function STREAM failed: Stream process exited with non-zero exit value (1). Last few lines of output were: Error in tempFUN1422354862988274097443(c(1)) : object 'C_runif' not found Calls: asterWriteFun ... tempFUN1422354862988274097443 <- serialize <-sstrtoi Execution halted . > runif function (n, min = 0, max = 1) .External(C_runif, n, min, max) <bytecode: 0x154e5a0> <environment: namespace:stats>

A workaround is to use the script or the name method, or wrap the function into another function. For example:

ta.eval(function(x)runif(x), 1, FUN.upload = "deparse")