I want to cross_join two arrays A, B which have same name of dimensions, defined as
A: <cntid:uint64 NULL DEFAULT null> [hid=0:,1000000,0,hid_2=0:,1000000,0]’,true
B: <cntid:uint64 NULL DEFAULT null> [hid=0:*,1000000,0]’,true
So cross_join(A,B,hid_2,hid) where hid_2 is from array A and hid is from B.
Now it is obvious that hid is from array B, yet I get the "Error description: Query syntax error. Dimension ‘hid’ is ambiguous."
Agreed hid is in array A, but documentation says “cross_join(left_array,right_array,left_dim1,right_dim1,…)”
Why is this so? Can I alias these arrays some how as in AQL: “select * into TEMP from A as a JOIN B as b on a.hid_2 = b.hid”
Makes me think, AQL semantics are neat in this case, but AFL is not.
For AFL, I have been materializing the result of cross_join(A,B) and then filtering to do hid_2 = hid_3 where hid_3 belongs to B.
This is not efficient.
I am aware of attribute rename. Is there a dimension rename or am I doing something wrong?
Also orthogonal question: is there any difference between AFL and AQL (semantics and performance-wise) or are they two sides of the same coin? When should one use one over the other?
Thanks much in advance!!