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

Teradata Aster® R User GuideUpdate 3

Product
Aster R
Release Number
7.00.02.01
Published
December 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
fop1497542774450.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
fbp1477004286096
lifecycle
previous
Product Category
Software

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")