Cross Join and Non-Numeric Dimension Question


#1

I am getting an error when using a non number (string) dimension. Question is will Cross Join work with non numeric dimension values?

Here is the schema:

AFL% show(city);
i,schema
0,"city<cityName:string NULL,temp:double> [sid(string)=*,100,0,cid=0:*,100,0]"
AFL% show(state);
i,schema
0,"state<stateName:string NULL> [sid(string)=*,100,0]"
AFL%
AFL% scan(city);
sid,cid,cityName,temp,EmptyTag
"1",1,"Albany",1.2,true
"1",2,"Troy",2.3,true
"1",3,"Cambridge",3.4,true
"2",1,"Boston",4.5,true
"2",2,"Cambridge",5.6,true
"3",1,"Brattleboro",6.7,true
AFL% scan(state);
sid,stateName,EmptyTag
"1","NY",true
"2","MA",true
"3","VT",true
"4","WY",true
AFL% cross_join(city as c, state as s, c.sid, s.sid);
UserException in file: src/query/ops/cross_join/LogicalCrossJoin.cpp function: inferSchema line: 148
Error id: scidb::SCIDB_SE_INFER_SCHEMA::SCIDB_LE_ARRAYS_NOT_CONFORMANT
Error description: Error during schema inferring. Arrays are not conformant.
Failed query id: 1101329517550

But the following works:

schema:

AFL% show(city); i,schema 0,"city<cityName:string NULL,temp:double> [sid=0:*,100,0,cid=0:*,100,0]" AFL% show(state); i,schema 0,"state<stateName:string NULL> [sid=0:*,100,0]"

AQL% set lang afl; AFL% scan(city); sid,cid,cityName,temp,EmptyTag 1,1,"Albany",1.2,true 1,2,"Troy",2.3,true 1,3,"Cambridge",3.4,true 2,1,"Boston",4.5,true 2,2,"Cambridge",5.6,true 3,1,"Brattleboro",6.7,true AFL% scan(state); sid,stateName,EmptyTag 1,"NY",true 2,"MA",true 3,"VT",true 4,"WY",true AFL% cross_join(city as c, state as s, c.sid, s.sid); sid,cid,cityName,temp,stateName,EmptyTag 1,1,"Albany",1.2,"NY",true 1,2,"Troy",2.3,"NY",true 1,3,"Cambridge",3.4,"NY",true 2,1,"Boston",4.5,"MA",true 2,2,"Cambridge",5.6,"MA",true 3,1,"Brattleboro",6.7,"VT",true


#2

No, cross_join does not support mapped non-integer dimensions.