Two questions about Query language (Join and UDF)


#1

Hope someone can help with this case. Thanks in advance.

Say we have two arrays and their query as following.

create array A <float x, float y, float z, float p > [~]
create array B [i=1:100]

Select A.p B0.enery B1.energy,B2.energy
From A JOIN B as B0 f(x,y,z) = B0.i
JOIN B as B1 f(x,y,z) + 1 = B1.i
JOIN B as B2 f(x,y,z) + 1 = B2.i

First, does above JOIN query with AS clause work in ScidB ? I know it works in most SQL database. If it don’t work in SciDB, how can I convert it into subquery?

Second, how can I define/use this function f(x,y,z) in SciDB, especially from "iquery -aq " interface ? I only found some documentation here scidb.org/HTMLmanual/13.6/sc … 12s03.html, but it don’t show how actually a user will use it.

Thanks,
Bin