Input data type in r_exec


#1

Dear all,

I have been trying the r_exec function and met the following problem:

When all the attributes of the array are of data type “double”, then there is no problem; However, if not all the attributes are of datatype “double”, even if I only use the attribute with type “double”, I still got the following error:

Error in scidbquery(query, afl, async = FALSE, save = “lcsv+”, release = 0, :
SystemException in file: LogicalRExec.cpp function: checkInputAttributes line: 51
Error id: scidb::SCIDB_SE_OPERATOR::SCIDB_LE_ILLEGAL_OPERATION
Error description: Operator error. Illegal operation: r_exec only accepts an input with attributes of type double.

My experimental array (t5) has the following schema:

iquery(‘show(t5)’,return=TRUE)
i schema
1 0 t5<z:int64,z1:double> [i=1:8,2,0,j=1:8,2,0]


the code is like this:

iquery(" r_exec(t5,

  • 'expr=
  • output1=z1-0.001
  • list(output1)’)
  •    ",return=TRUE)
    

Are there any way of solving this problem?

Thanks a lot,
Meng


#2

You can use project operator to selectively project only the attributes the next operator wants (doubles). Project double attribute(s) from your array and pass the result to the next operator that requires all doubles.


#3

Good idea, thanks!